Single unit container. More...
#include <mi32/uom.h>
Public Types | |
| enum | NAMEUSAGE { NAMEUSAGE_Singular, NAMEUSAGE_Plural } |
Public Member Functions | |
| UNIT (IDNUM idnum) | |
| UNIT (const UNIT &rhs) | |
| UNIT () | |
| ~UNIT () | |
| void | ConvertFromBase (double inval, MISTRING &outstr) const |
| double | ConvertFromBase (double inval) const |
| double | ConvertToBase (const MISTRING &instr) const |
| double | ConvertToBase (double inval) const |
| void | Define (const MEASURE::TYPE MeasureType, double ConversionToBase, const MISTRING &Symbol, const MISTRING &NameSingular, const MISTRING &NamePlural) |
| IDNUM | GetCompositeIdNum () const |
| double | GetFactorA () const |
| double | GetFactorB () const |
| double | GetFactorC () const |
| const IDENTIFIERLIST & | GetIdList () const |
| int | GetIdNum () const |
| const MEASURE & | GetMeasure () const |
| const MISTRING & | GetName (NAMEUSAGE nameusage) const |
| const MISTRING & | GetSymbol () const |
| bool | IsEqual (const UNIT &rhs) const |
| bool | IsString () const |
| UNIT & | operator= (IDNUM idnum) |
| UNIT & | operator= (const UNIT &rhs) |
Single unit container.
Normally a UNIT instance is obtained using one of the MEASURE::FindUnit() or GetBaseUnit() methods.
| enum UOM::UNIT::NAMEUSAGE |
| UOM::UNIT::UNIT | ( | ) |
Default constructor.
| UOM::UNIT::UNIT | ( | const UNIT & | rhs | ) |
Copy constructor.
| UOM::UNIT::UNIT | ( | IDNUM | idnum | ) |
Construct from composite measure/unit ID.
| UOM::UNIT::~UNIT | ( | ) |
Destructor.
| void UOM::UNIT::ConvertFromBase | ( | double | inval, | |
| MISTRING & | outstr | |||
| ) | const |
Convert value in base unit to this unit (string).
| double UOM::UNIT::ConvertFromBase | ( | double | inval | ) | const |
Convert value in base unit to this unit (numeric).
| double UOM::UNIT::ConvertToBase | ( | const MISTRING & | instr | ) | const |
Convert string value in this unit to base unit.
| double UOM::UNIT::ConvertToBase | ( | double | inval | ) | const |
Convert numeric value in this unit to base unit.
| void UOM::UNIT::Define | ( | const MEASURE::TYPE | MeasureType, | |
| double | ConversionToBase, | |||
| const MISTRING & | Symbol, | |||
| const MISTRING & | NameSingular, | |||
| const MISTRING & | NamePlural | |||
| ) |
Define user-defined unit.
| IDNUM UOM::UNIT::GetCompositeIdNum | ( | ) | const |
| double UOM::UNIT::GetFactorA | ( | ) | const |
Get factor A in conversion formula.
| double UOM::UNIT::GetFactorB | ( | ) | const |
Get factor B in conversion formula.
| double UOM::UNIT::GetFactorC | ( | ) | const |
Get factor C in conversion formula.
| const IDENTIFIERLIST& UOM::UNIT::GetIdList | ( | ) | const |
Get identifer list for unit.
| int UOM::UNIT::GetIdNum | ( | ) | const |
Get MicroImages unit identification number.
| const MEASURE& UOM::UNIT::GetMeasure | ( | ) | const |
Get measure unit applies to.
Get unit name.
| nameusage | Usage name is for |
| const MISTRING& UOM::UNIT::GetSymbol | ( | ) | const |
Get unit symbol.
| bool UOM::UNIT::IsEqual | ( | const UNIT & | rhs | ) | const |
Determine if equal.
| bool UOM::UNIT::IsString | ( | ) | const |
Determine if unit requires a string representation.
1.6.1