#include <CFMUnit.hpp>
Inheritance diagram for openstudio::CFMUnit:Related Symbols | |
(Note that these are not member symbols.) | |
| using | CFMUnitVector = std::vector<CFMUnit> |
| using | OptionalCFMUnit = boost::optional<CFMUnit> |
Create Functions Used by UnitFactory | |
| CFMUnit | createCFMLength () |
| CFMUnit | createCFMTime () |
| CFMUnit | createCFMPower () |
| CFMUnit | createCFMTemperature () |
| CFMUnit | createCFMElectricCurrent () |
| CFMUnit | createCFMLuminousIntensity () |
| CFMUnit | createCFMAmountOfSubstance () |
| CFMUnit | createCFMAngle () |
| CFMUnit | createCFMSolidAngle () |
| CFMUnit | createCFMPeople () |
| CFMUnit | createCFMCycle () |
| CFMUnit | createCFMCurrency () |
| CFMUnit | createCFMVolumetricFlowrate () |
| Cubic feet per minute (cfm) = ft^3/min. | |
| CFMUnit | createCFMLuminousFlux () |
| Lumen (lm) = cd*sr. | |
| CFMUnit | createCFMIlluminance () |
| Foot-candles (fc) = lm/ft^2 = cd*sr/ft^2. | |
| CFMUnit | createCFMFrequency () |
| Rotations per minute (rpm) = cycles/min. | |
Related Symbols inherited from openstudio::Unit | |
| using | OptionalUnit = boost::optional<Unit> |
| using | UnitVector = std::vector<Unit> |
Constructors and Destructors | |
| CFMUnit (const CFMExpnt &exponents=CFMExpnt(), int scaleExponent=0, const std::string &prettyString="") | |
| Default constructor. | |
| CFMUnit (const std::string &scaleAbbreviation, const CFMExpnt &exponents=CFMExpnt(), const std::string &prettyString="") | |
| Alternate constructor. | |
| virtual | ~CFMUnit () override=default |
Additional Inherited Members | |
Public Member Functions inherited from openstudio::Unit | |
| Unit (int scaleExponent=0, const std::string &prettyString="") | |
| Default constructor. | |
| Unit (const std::string &scaleAbbreviation, const std::string &prettyString="") | |
| Constructor using scale abbreviations registered in ScaleFactory. | |
| virtual | ~Unit ()=default |
| Unit | clone () const |
| Deep copy constructor. | |
| Unit | cloneToMixed () const |
| Deep copy constructor that discards system designation. | |
| std::vector< std::string > | baseUnits () const |
| Returns base units already available in Unit. | |
| bool | isBaseUnit (const std::string &baseUnit) const |
| Returns true if baseUnit is available in Unit. | |
| int | baseUnitExponent (const std::string &baseUnit) const |
| Base unit exponent getter. Returns 0 if baseUnit not present. */. | |
| void | setBaseUnitExponent (const std::string &baseUnit, int exponent) |
| Sets baseUnit^exponent. If baseUnit not yet present, is added and return value is true. | |
| Scale | scale () const |
| Scale getter. | |
| bool | setScale (int scaleExponent) |
| Sets the scale to the one registered in ScaleFactory for 10^scaleExponent. | |
| bool | setScale (const std::string &scaleAbbreviation) |
| Sets the scale to the one registered in ScaleFactory under scaleAbbreviation. | |
| std::string | standardString (bool withScale=true) const |
| Returns the standard output string for this unit. | |
| std::string | prettyString (bool withScale=true) const |
| Returns the preferred output string for this unit. | |
| void | setPrettyString (const std::string &str) |
| Setter for prettyString (do not include scale abbreviation). | |
| std::string | print (bool withScale=true) const |
| Returns prettyString(withScale) if it exists; otherwise returns standardString(withScale). | |
| UnitSystem | system () const |
| Getter for this Unit's system. | |
| bool | operator== (const Unit &rUnit) const |
| Equality for units. | |
| Unit & | operator*= (const Unit &rUnit) |
| Multiply-assign operator. | |
| Unit & | operator/= (const Unit &rUnit) |
| Divide-assign operator. | |
| Unit & | pow (int expNum, int expDenom=1, bool okToCallFactory=true) |
| Raise Unit to a rational power. | |
| template<typename T > | |
| T | cast () const |
| Cast to type T. | |
| template<typename T > | |
| boost::optional< T > | optionalCast () const |
| Cast to boost::optional<T>. | |
CFMUnit is a Unit with baseUnits fixed by its constructors, see CFMExpnt.
setBaseUnitExponent throws an exception if any other string is passed in as a baseUnit. CFMUnit.hpp declares related operators and UnitFactory callback functions.
| openstudio::CFMUnit::CFMUnit | ( | const CFMExpnt & | exponents = CFMExpnt(), |
| int | scaleExponent = 0, | ||
| const std::string & | prettyString = "" ) |
Default constructor.
Example:
CFMUnit myPower(CFMExpnt(0,0,1)); std::cout << myPower; // produces "ton"
| [in] | exponents | holds the exponents for each base unit. |
| [in] | scaleExponent | exponent for scale. For instance 3 for kilo. |
| [in] | prettyString | optional string to use in place of standardString. |
| openstudio::CFMUnit::CFMUnit | ( | const std::string & | scaleAbbreviation, |
| const CFMExpnt & | exponents = CFMExpnt(), | ||
| const std::string & | prettyString = "" ) |
Alternate constructor.
Specify the abbreviation of the scale, rather than its exponent.
| [in] | scaleAbbreviation | is string equal to a scale abbreviation. For instance "k" for kilo. |
| [in] | exponents | holds the exponents for each base unit. |
| [in] | prettyString | optional string to use in place of standardString. |
|
overridevirtualdefault |
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
Rotations per minute (rpm) = cycles/min.
|
related |
Foot-candles (fc) = lm/ft^2 = cd*sr/ft^2.
|
related |
|
related |
Lumen (lm) = cd*sr.
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
Cubic feet per minute (cfm) = ft^3/min.
|
related |