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

Representation of voltage, internally stored as floating-point Volts. More...

#include <voltage.h>

Public Member Functions

 Voltage ()
 Creates a voltage object representing an 'unknown' voltage.
 
float inKiloVolts () const
 Returns the voltage in kiloVolts.
 
float inVolts () const
 Returns the voltage in Volts.
 
float inMilliVolts () const
 Returns the voltage in milliVolts.
 
float inMicroVolts () const
 Returns the voltage in microVolts.
 
bool isUnknown () const
 Returns whether the object represents an unknown voltage.
 
bool operator< (const Voltage &other) const
 
bool operator== (const Voltage &other) const
 
bool operator> (const Voltage &other) const
 
bool operator<= (const Voltage &other) const
 
bool operator>= (const Voltage &other) const
 
bool operator!= (const Voltage &other) const
 
Voltageoperator+= (const Voltage &other)
 
Voltageoperator-= (const Voltage &other)
 
Voltageoperator*= (float multi)
 
Voltageoperator/= (float div)
 

Friends

Voltage UnknownVoltage ()
 Returns a voltage object representing an unknown voltage.
 
Voltage VoltageInVolts (float)
 Returns a voltage object equivalent to the specified voltage expressed in Volts.
 

Detailed Description

Representation of voltage, internally stored as floating-point Volts.

Definition at line 21 of file voltage.h.

Constructor & Destructor Documentation

◆ Voltage()

roo_quantity::Voltage::Voltage ( )
inline

Creates a voltage object representing an 'unknown' voltage.

Definition at line 24 of file voltage.h.

Member Function Documentation

◆ inKiloVolts()

float roo_quantity::Voltage::inKiloVolts ( ) const
inline

Returns the voltage in kiloVolts.

Definition at line 27 of file voltage.h.

◆ inMicroVolts()

float roo_quantity::Voltage::inMicroVolts ( ) const
inline

Returns the voltage in microVolts.

Definition at line 36 of file voltage.h.

◆ inMilliVolts()

float roo_quantity::Voltage::inMilliVolts ( ) const
inline

Returns the voltage in milliVolts.

Definition at line 33 of file voltage.h.

◆ inVolts()

◆ isUnknown()

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

Returns whether the object represents an unknown voltage.

Definition at line 39 of file voltage.h.

◆ operator!=()

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

Definition at line 61 of file voltage.h.

◆ operator*=()

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

Definition at line 75 of file voltage.h.

◆ operator+=()

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

Definition at line 65 of file voltage.h.

References inVolts().

◆ operator-=()

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

Definition at line 70 of file voltage.h.

References inVolts().

◆ operator/=()

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

Definition at line 80 of file voltage.h.

◆ operator<()

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

Definition at line 41 of file voltage.h.

◆ operator<=()

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

Definition at line 53 of file voltage.h.

◆ operator==()

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

Definition at line 45 of file voltage.h.

◆ operator>()

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

Definition at line 49 of file voltage.h.

◆ operator>=()

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

Definition at line 57 of file voltage.h.

Friends And Related Symbol Documentation

◆ UnknownVoltage

Voltage UnknownVoltage ( )
friend

Returns a voltage object representing an unknown voltage.

Definition at line 108 of file voltage.h.

◆ VoltageInVolts

Voltage VoltageInVolts ( float  voltage)
friend

Returns a voltage object equivalent to the specified voltage expressed in Volts.

Definition at line 118 of file voltage.h.


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