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

Representation of resistance, internally stored as floating-point Ohms. More...

#include <resistance.h>

Public Member Functions

 Resistance ()
 Creates a resistance object representing an 'unknown' resistance.
 
float inGigaOhms () const
 Returns the resistance in GigaOhms.
 
float inMegaOhms () const
 Returns the resistance in MegaOhms.
 
float inKiloOhms () const
 Returns the resistance in kiloOhms.
 
float inOhms () const
 Returns the resistance in Ohms.
 
float inMilliOhms () const
 Returns the resistance in milliOhms.
 
float inMicroOhms () const
 Returns the resistance in microOhms.
 
float inNanoOhms () const
 Returns the resistance in nanoOhms.
 
bool isUnknown () const
 Returns whether the object represents an unknown resistance.
 
bool operator< (const Resistance &other) const
 
bool operator== (const Resistance &other) const
 
bool operator> (const Resistance &other) const
 
bool operator<= (const Resistance &other) const
 
bool operator>= (const Resistance &other) const
 
bool operator!= (const Resistance &other) const
 
Resistanceoperator+= (const Resistance &other)
 
Resistanceoperator-= (const Resistance &other)
 
Resistanceoperator*= (float multi)
 
Resistanceoperator/= (float div)
 

Friends

Resistance UnknownResistance ()
 Returns a resistance object representing an unknown resistance.
 
Resistance ResistanceInOhms (float)
 Returns a resistance object equivalent to the specified resistance expressed in Ohms.
 

Detailed Description

Representation of resistance, internally stored as floating-point Ohms.

Definition at line 21 of file resistance.h.

Constructor & Destructor Documentation

◆ Resistance()

roo_quantity::Resistance::Resistance ( )
inline

Creates a resistance object representing an 'unknown' resistance.

Definition at line 24 of file resistance.h.

Member Function Documentation

◆ inGigaOhms()

float roo_quantity::Resistance::inGigaOhms ( ) const
inline

Returns the resistance in GigaOhms.

Definition at line 27 of file resistance.h.

◆ inKiloOhms()

float roo_quantity::Resistance::inKiloOhms ( ) const
inline

Returns the resistance in kiloOhms.

Definition at line 33 of file resistance.h.

◆ inMegaOhms()

float roo_quantity::Resistance::inMegaOhms ( ) const
inline

Returns the resistance in MegaOhms.

Definition at line 30 of file resistance.h.

◆ inMicroOhms()

float roo_quantity::Resistance::inMicroOhms ( ) const
inline

Returns the resistance in microOhms.

Definition at line 42 of file resistance.h.

◆ inMilliOhms()

float roo_quantity::Resistance::inMilliOhms ( ) const
inline

Returns the resistance in milliOhms.

Definition at line 39 of file resistance.h.

◆ inNanoOhms()

float roo_quantity::Resistance::inNanoOhms ( ) const
inline

Returns the resistance in nanoOhms.

Definition at line 45 of file resistance.h.

◆ inOhms()

◆ isUnknown()

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

Returns whether the object represents an unknown resistance.

Definition at line 48 of file resistance.h.

◆ operator!=()

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

Definition at line 70 of file resistance.h.

◆ operator*=()

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

Definition at line 84 of file resistance.h.

◆ operator+=()

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

Definition at line 74 of file resistance.h.

References inOhms().

◆ operator-=()

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

Definition at line 79 of file resistance.h.

References inOhms().

◆ operator/=()

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

Definition at line 89 of file resistance.h.

◆ operator<()

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

Definition at line 50 of file resistance.h.

◆ operator<=()

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

Definition at line 62 of file resistance.h.

◆ operator==()

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

Definition at line 54 of file resistance.h.

◆ operator>()

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

Definition at line 58 of file resistance.h.

◆ operator>=()

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

Definition at line 66 of file resistance.h.

Friends And Related Symbol Documentation

◆ ResistanceInOhms

Resistance ResistanceInOhms ( float  resistance)
friend

Returns a resistance object equivalent to the specified resistance expressed in Ohms.

Definition at line 139 of file resistance.h.

◆ UnknownResistance

Resistance UnknownResistance ( )
friend

Returns a resistance object representing an unknown resistance.

Definition at line 117 of file resistance.h.


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