Class holding a set of unit conversions for physical properties.
More...
#include <FFaUnitCalculator.H>
|
| | FFaUnitCalculator (const char *n=NULL) |
| | Default constructor. More...
|
| |
| bool | isValid () const |
| | Returns true if *this is valid, i.e., name is defined. More...
|
| |
| bool | operator== (const FFaUnitCalculator &cal) const |
| | Equality operator. More...
|
| |
| const std::string & | getName () const |
| | Returns the name of the unit calculator. More...
|
| |
| const std::string & | getOrigUnits () const |
| | Returns the name of the original unit set. More...
|
| |
| const std::string & | getConvUnits () const |
| | Returns the name of the converted-to unit set. More...
|
| |
| template<class T > |
| bool | convert (T &value, const std::string &aName) const |
| | Converts a named physical property. More...
|
| |
| bool | convert (double &value, const std::string &aName, int prec) const |
| | Conversion with rounding to prec significant digits. More...
|
| |
| template<class T > |
| bool | inverse (T &value, const std::string &aName) const |
| | Reversed conversion for a named physical property. More...
|
| |
| double | convFactor (const std::string &aName) const |
| | Returns the conversion factor for a named physical property. More...
|
| |
| std::string | origUnitName (const std::string &aName) const |
| | Returns the original unit name for a named physical property. More...
|
| |
| std::string | convUnitName (const std::string &aName) const |
| | Returns the converted-to unit name for a named physical property. More...
|
| |
| void | addConversion (const std::string &propName, double sf, const std::string &origUnit="", const std::string &convUnit="") |
| | Adds a unit conversion to the set of conversion rules. More...
|
| |
Class holding a set of unit conversions for physical properties.
◆ SingleUnitIter
◆ SingleUnitMap
◆ FFaUnitCalculator()
| FFaUnitCalculator::FFaUnitCalculator |
( |
const char * |
n = NULL | ) |
|
|
inlineexplicit |
◆ addConversion()
| void FFaUnitCalculator::addConversion |
( |
const std::string & |
propName, |
|
|
double |
sf, |
|
|
const std::string & |
origUnit = "", |
|
|
const std::string & |
convUnit = "" |
|
) |
| |
Adds a unit conversion to the set of conversion rules.
- Parameters
-
| [in] | propName | Name of the physical property to convert |
| [in] | sf | Conversion factor for the property parameter |
| [in] | origUnit | Original unit name for the property parameter |
| [in] | convUnit | Converted-to unit name for the property parameter |
◆ convert() [1/2]
| bool FFaUnitCalculator::convert |
( |
double & |
value, |
|
|
const std::string & |
aName, |
|
|
int |
prec |
|
) |
| const |
Conversion with rounding to prec significant digits.
◆ convert() [2/2]
template<class T >
| bool FFaUnitCalculator::convert |
( |
T & |
value, |
|
|
const std::string & |
aName |
|
) |
| const |
|
inline |
Converts a named physical property.
◆ convFactor()
| double FFaUnitCalculator::convFactor |
( |
const std::string & |
aName | ) |
const |
|
inline |
Returns the conversion factor for a named physical property.
◆ convUnitName()
| std::string FFaUnitCalculator::convUnitName |
( |
const std::string & |
aName | ) |
const |
|
inline |
Returns the converted-to unit name for a named physical property.
◆ getConvUnits()
| const std::string& FFaUnitCalculator::getConvUnits |
( |
| ) |
const |
|
inline |
Returns the name of the converted-to unit set.
◆ getName()
| const std::string& FFaUnitCalculator::getName |
( |
| ) |
const |
|
inline |
Returns the name of the unit calculator.
◆ getOrigUnits()
| const std::string& FFaUnitCalculator::getOrigUnits |
( |
| ) |
const |
|
inline |
Returns the name of the original unit set.
◆ inverse()
template<class T >
| bool FFaUnitCalculator::inverse |
( |
T & |
value, |
|
|
const std::string & |
aName |
|
) |
| const |
|
inline |
Reversed conversion for a named physical property.
◆ isValid()
| bool FFaUnitCalculator::isValid |
( |
| ) |
const |
|
inline |
Returns true if *this is valid, i.e., name is defined.
◆ operator==()
◆ origUnitName()
| std::string FFaUnitCalculator::origUnitName |
( |
const std::string & |
aName | ) |
const |
|
inline |
Returns the original unit name for a named physical property.
◆ operator<<
Global printing operator.
◆ operator>>
◆ convGroup
| std::string FFaUnitCalculator::convGroup |
|
private |
Name of the converted-to unit set.
◆ myConvFactors
Unit converter container.
◆ name
| std::string FFaUnitCalculator::name |
|
private |
Name of the unit calculator.
◆ origGroup
| std::string FFaUnitCalculator::origGroup |
|
private |
Name of the original unit set.
The documentation for this class was generated from the following files: