|
roo_quantity
API Documentation for roo_quantity
|
Representation of a temperature, internally stored as floating-point Celsius degrees. More...
#include <temperature.h>
Public Member Functions | |
| Temperature () | |
| Creates a temperature object representing an 'unknown' temperature. | |
| float | degCelcius () const |
| Returns the temperature in degrees Celcius. | |
| float | degKelvin () const |
| Returns the temperature in degrees Kelvin. | |
| float | degFahrenheit () const |
| Returns the temperature in degrees Fahrenheit. | |
| bool | isUnknown () const |
| Returns whether the object represents an unknown temperature. | |
| bool | operator< (const Temperature &other) const |
| bool | operator== (const Temperature &other) const |
| bool | operator> (const Temperature &other) const |
| bool | operator<= (const Temperature &other) const |
| bool | operator>= (const Temperature &other) const |
| bool | operator!= (const Temperature &other) const |
| Temperature & | operator+= (const TemperatureDelta &other) |
| Temperature & | operator-= (const TemperatureDelta &other) |
Friends | |
| Temperature | UnknownTemperature () |
| Returns a temperature object representing an unknown temperature. | |
| Temperature | TemperatureDegCelcius (float) |
| Returns a temperature object equivalent to the specified temperature expressed in Celcius degrees. | |
| Temperature | TemperatureDegKelvin (float) |
| Returns a temperature object equivalent to the specified temperature expressed in Kelvin degrees. | |
| Temperature | TemperatureDegFahrenheit (float) |
| Returns a temperature object approximately equal to the specified temperature expressed in Fahrenheit degrees. | |
Representation of a temperature, internally stored as floating-point Celsius degrees.
Definition at line 26 of file temperature.h.
|
inline |
Creates a temperature object representing an 'unknown' temperature.
Definition at line 29 of file temperature.h.
|
inline |
Returns the temperature in degrees Celcius.
Definition at line 32 of file temperature.h.
Referenced by roo_quantity::operator+(), roo_quantity::operator+(), roo_quantity::operator-(), and roo_quantity::operator-().
|
inline |
Returns the temperature in degrees Fahrenheit.
Definition at line 38 of file temperature.h.
|
inline |
Returns the temperature in degrees Kelvin.
Definition at line 35 of file temperature.h.
|
inline |
Returns whether the object represents an unknown temperature.
Definition at line 41 of file temperature.h.
|
inline |
Definition at line 63 of file temperature.h.
|
inline |
Definition at line 239 of file temperature.h.
References roo_quantity::TemperatureDelta::degCelcius().
|
inline |
Definition at line 244 of file temperature.h.
References roo_quantity::TemperatureDelta::degCelcius().
|
inline |
Definition at line 43 of file temperature.h.
|
inline |
Definition at line 55 of file temperature.h.
|
inline |
Definition at line 47 of file temperature.h.
|
inline |
Definition at line 51 of file temperature.h.
|
inline |
Definition at line 59 of file temperature.h.
|
friend |
Returns a temperature object equivalent to the specified temperature expressed in Celcius degrees.
Definition at line 189 of file temperature.h.
|
friend |
Returns a temperature object approximately equal to the specified temperature expressed in Fahrenheit degrees.
Due to floating-point rounding errors, and since the temperature is internally stored in Celcius degrees, generally, DegFahrenheit(x).degFahrenheit() != x.
Definition at line 209 of file temperature.h.
|
friend |
Returns a temperature object equivalent to the specified temperature expressed in Kelvin degrees.
Due to floating-point rounding errors, and since the temperature is internally stored in Celcius degrees, generally, DegKelvin(x).degKelvin() != x.
Definition at line 199 of file temperature.h.
|
friend |
Returns a temperature object representing an unknown temperature.
Definition at line 185 of file temperature.h.