roo_quantity
API Documentation for roo_quantity
Loading...
Searching...
No Matches
roo_quantity::Current Class Reference

Representation of current, internally stored as floating-point Amperes. More...

#include <current.h>

Public Member Functions

 Current ()
 Creates a current object representing an 'unknown' current.
 
float inMegaAmperes () const
 Returns the current in megaAmperes.
 
float inKiloAmperes () const
 Returns the current in kiloAmperes.
 
float inAmperes () const
 Returns the current in Amperes.
 
float inMilliAmperes () const
 Returns the current in milliAmperes.
 
float inMicroAmperes () const
 Returns the current in microAmperes.
 
bool isUnknown () const
 Returns whether the object represents an unknown current.
 
bool operator< (const Current &other) const
 
bool operator== (const Current &other) const
 
bool operator> (const Current &other) const
 
bool operator<= (const Current &other) const
 
bool operator>= (const Current &other) const
 
bool operator!= (const Current &other) const
 
Currentoperator+= (const Current &other)
 
Currentoperator-= (const Current &other)
 
Currentoperator*= (float multi)
 
Currentoperator/= (float div)
 

Friends

Current UnknownCurrent ()
 Returns a current object representing an unknown current.
 
Current CurrentInAmperes (float)
 Returns a current object equivalent to the specified current expressed in Amperes.
 

Detailed Description

Representation of current, internally stored as floating-point Amperes.

Definition at line 21 of file current.h.

Constructor & Destructor Documentation

◆ Current()

roo_quantity::Current::Current ( )
inline

Creates a current object representing an 'unknown' current.

Definition at line 24 of file current.h.

Member Function Documentation

◆ inAmperes()

◆ inKiloAmperes()

float roo_quantity::Current::inKiloAmperes ( ) const
inline

Returns the current in kiloAmperes.

Definition at line 30 of file current.h.

◆ inMegaAmperes()

float roo_quantity::Current::inMegaAmperes ( ) const
inline

Returns the current in megaAmperes.

Definition at line 27 of file current.h.

◆ inMicroAmperes()

float roo_quantity::Current::inMicroAmperes ( ) const
inline

Returns the current in microAmperes.

Definition at line 39 of file current.h.

◆ inMilliAmperes()

float roo_quantity::Current::inMilliAmperes ( ) const
inline

Returns the current in milliAmperes.

Definition at line 36 of file current.h.

◆ isUnknown()

bool roo_quantity::Current::isUnknown ( ) const
inline

Returns whether the object represents an unknown current.

Definition at line 42 of file current.h.

◆ operator!=()

bool roo_quantity::Current::operator!= ( const Current other) const
inline

Definition at line 64 of file current.h.

◆ operator*=()

Current & roo_quantity::Current::operator*= ( float  multi)
inline

Definition at line 78 of file current.h.

◆ operator+=()

Current & roo_quantity::Current::operator+= ( const Current other)
inline

Definition at line 68 of file current.h.

References inAmperes().

◆ operator-=()

Current & roo_quantity::Current::operator-= ( const Current other)
inline

Definition at line 73 of file current.h.

References inAmperes().

◆ operator/=()

Current & roo_quantity::Current::operator/= ( float  div)
inline

Definition at line 83 of file current.h.

◆ operator<()

bool roo_quantity::Current::operator< ( const Current other) const
inline

Definition at line 44 of file current.h.

◆ operator<=()

bool roo_quantity::Current::operator<= ( const Current other) const
inline

Definition at line 56 of file current.h.

◆ operator==()

bool roo_quantity::Current::operator== ( const Current other) const
inline

Definition at line 48 of file current.h.

◆ operator>()

bool roo_quantity::Current::operator> ( const Current other) const
inline

Definition at line 52 of file current.h.

◆ operator>=()

bool roo_quantity::Current::operator>= ( const Current other) const
inline

Definition at line 60 of file current.h.

Friends And Related Symbol Documentation

◆ CurrentInAmperes

Current CurrentInAmperes ( float  current)
friend

Returns a current object equivalent to the specified current expressed in Amperes.

Definition at line 127 of file current.h.

◆ UnknownCurrent

Current UnknownCurrent ( )
friend

Returns a current object representing an unknown current.

Definition at line 111 of file current.h.


The documentation for this class was generated from the following file: