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

Representation of power, internally stored as floating-point Watts. More...

#include <power.h>

Public Member Functions

 Power ()
 Creates a power object representing an 'unknown' power.
 
float inGigaWatts () const
 Returns the power in gigaWatts.
 
float inMegaWatts () const
 Returns the power in megaWatts.
 
float inKiloWatts () const
 Returns the power in kiloWatts.
 
float inWatts () const
 Returns the power in Watts.
 
float inMilliWatts () const
 Returns the power in milliWatts.
 
float inMicroWatts () const
 Returns the power in microWatts.
 
bool isUnknown () const
 Returns whether the object represents an unknown power.
 
bool operator< (const Power &other) const
 
bool operator== (const Power &other) const
 
bool operator> (const Power &other) const
 
bool operator<= (const Power &other) const
 
bool operator>= (const Power &other) const
 
bool operator!= (const Power &other) const
 
Poweroperator+= (const Power &other)
 
Poweroperator-= (const Power &other)
 
Poweroperator*= (float multi)
 
Poweroperator/= (float div)
 

Friends

Power UnknownPower ()
 Returns a power object representing an unknown power.
 
Power PowerInWatts (float)
 Returns a power object equivalent to the specified power expressed in Watts.
 

Detailed Description

Representation of power, internally stored as floating-point Watts.

Definition at line 21 of file power.h.

Constructor & Destructor Documentation

◆ Power()

roo_quantity::Power::Power ( )
inline

Creates a power object representing an 'unknown' power.

Definition at line 24 of file power.h.

Member Function Documentation

◆ inGigaWatts()

float roo_quantity::Power::inGigaWatts ( ) const
inline

Returns the power in gigaWatts.

Definition at line 27 of file power.h.

◆ inKiloWatts()

float roo_quantity::Power::inKiloWatts ( ) const
inline

Returns the power in kiloWatts.

Definition at line 33 of file power.h.

◆ inMegaWatts()

float roo_quantity::Power::inMegaWatts ( ) const
inline

Returns the power in megaWatts.

Definition at line 30 of file power.h.

◆ inMicroWatts()

float roo_quantity::Power::inMicroWatts ( ) const
inline

Returns the power in microWatts.

Definition at line 42 of file power.h.

◆ inMilliWatts()

float roo_quantity::Power::inMilliWatts ( ) const
inline

Returns the power in milliWatts.

Definition at line 39 of file power.h.

◆ inWatts()

◆ isUnknown()

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

Returns whether the object represents an unknown power.

Definition at line 45 of file power.h.

◆ operator!=()

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

Definition at line 57 of file power.h.

◆ operator*=()

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

Definition at line 71 of file power.h.

◆ operator+=()

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

Definition at line 61 of file power.h.

References inWatts().

◆ operator-=()

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

Definition at line 66 of file power.h.

References inWatts().

◆ operator/=()

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

Definition at line 76 of file power.h.

◆ operator<()

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

Definition at line 47 of file power.h.

◆ operator<=()

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

Definition at line 53 of file power.h.

◆ operator==()

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

Definition at line 49 of file power.h.

◆ operator>()

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

Definition at line 51 of file power.h.

◆ operator>=()

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

Definition at line 55 of file power.h.

Friends And Related Symbol Documentation

◆ PowerInWatts

Power PowerInWatts ( float  power)
friend

Returns a power object equivalent to the specified power expressed in Watts.

Definition at line 126 of file power.h.

◆ UnknownPower

Power UnknownPower ( )
friend

Returns a power object representing an unknown power.

Definition at line 104 of file power.h.


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