UOM::UNIT Class Reference

Single unit container. More...

#include <mi32/uom.h>

List of all members.

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 IDENTIFIERLISTGetIdList () const
int GetIdNum () const
const MEASUREGetMeasure () const
const MISTRINGGetName (NAMEUSAGE nameusage) const
const MISTRINGGetSymbol () const
bool IsEqual (const UNIT &rhs) const
bool IsString () const
UNIToperator= (IDNUM idnum)
UNIToperator= (const UNIT &rhs)

Detailed Description

Single unit container.

Normally a UNIT instance is obtained using one of the MEASURE::FindUnit() or GetBaseUnit() methods.


Member Enumeration Documentation

Enumerator:
NAMEUSAGE_Singular 
NAMEUSAGE_Plural 

Constructor & Destructor Documentation

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.


Member Function Documentation

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.

const MISTRING& UOM::UNIT::GetName ( NAMEUSAGE  nameusage  )  const

Get unit name.

Parameters:
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.

Returns:
true if string, false if not.
UNIT& UOM::UNIT::operator= ( IDNUM  idnum  ) 

Assignment from composite measure/unit ID.

UNIT& UOM::UNIT::operator= ( const UNIT rhs  ) 

Assignment.


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

Generated on Sun Oct 7 21:40:32 2012 for TNTsdk 2012 by  doxygen 1.6.1