# FoundationClasses
TKernel
Units

# Units Class Reference

This package provides all the facilities to create
and question a dictionary of units, and also to
manipulate measurements which are real values with
units.
.

`#include <Units.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)

## Static Public Member Functions

static Standard_EXPORT void | UnitsFile (const Standard_CString afile)
| Defines the location of the file containing all the information useful in creating the dictionary of all the units known to the system. .
static Standard_EXPORT void | LexiconFile (const Standard_CString afile)
| Defines the location of the file containing the lexicon useful in manipulating composite units. .
static Standard_EXPORT Handle_Units_UnitsDictionary | DictionaryOfUnits (const Standard_Boolean amode=Standard_False)
| Returns a unique instance of the dictionary of units. If <amode> is True, then it forces the recomputation of the dictionary of units. .
static Standard_EXPORT Handle_Units_Quantity | Quantity (const Standard_CString aquantity)
| Returns a unique quantity instance corresponding to <aquantity>. .
static Standard_EXPORT Standard_CString | FirstQuantity (const Standard_CString aunit)
| Returns the first quantity string founded from the unit <aunit>. .
static Standard_EXPORT Handle_Units_Lexicon | LexiconUnits (const Standard_Boolean amode=Standard_True)
| Returns a unique instance of the Units_Lexicon. If <amode> is True, it forces the recomputation of the dictionary of units, and by consequence the completion of the Units_Lexicon. .
static Standard_EXPORT Handle_Units_Lexicon | LexiconFormula ()
| Return a unique instance of LexiconFormula. .
static Standard_EXPORT Handle_Units_Dimensions | NullDimensions ()
| Returns always the same instance of Dimensions. .
static Standard_EXPORT Standard_Real | Convert (const Standard_Real avalue, const Standard_CString afirstunit, const Standard_CString asecondunit)
| Converts <avalue> expressed in <afirstunit> into the <asecondunit>. .
static Standard_EXPORT Standard_Real | ToSI (const Standard_Real aData, const Standard_CString aUnit)
static Standard_EXPORT Standard_Real | ToSI (const Standard_Real aData, const Standard_CString aUnit, Handle(Units_Dimensions)&aDim)
static Standard_EXPORT Standard_Real | FromSI (const Standard_Real aData, const Standard_CString aUnit)
static Standard_EXPORT Standard_Real | FromSI (const Standard_Real aData, const Standard_CString aUnit, Handle(Units_Dimensions)&aDim)
static Standard_EXPORT Handle_Units_Dimensions | Dimensions (const Standard_CString aType)
| return the dimension associated to the Type

## Member Function Documentation

static Standard_EXPORT Standard_Real Units::Convert | ( | const Standard_Real | avalue,
|  | const Standard_CString | afirstunit,
|  | const Standard_CString | asecondunit
| ) | `[static]`

static Standard_EXPORT Handle_Units_UnitsDictionary Units::DictionaryOfUnits | ( | const Standard_Boolean | amode = `Standard_False` | ) | `[static]`

static Standard_EXPORT Handle_Units_Dimensions Units::Dimensions | ( | const Standard_CString | aType | ) | `[static]`

static Standard_EXPORT Standard_CString Units::FirstQuantity | ( | const Standard_CString | aunit | ) | `[static]`

static Standard_EXPORT Standard_Real Units::FromSI | ( | const Standard_Real | aData,
|  | const Standard_CString | aUnit,
|  | Handle(Units_Dimensions)& | aDim
| ) | `[static]`

static Standard_EXPORT Standard_Real Units::FromSI | ( | const Standard_Real | aData,
|  | const Standard_CString | aUnit
| ) | `[static]`

static Standard_EXPORT void Units::LexiconFile | ( | const Standard_CString | afile | ) | `[static]`

static Standard_EXPORT Handle_Units_Lexicon Units::LexiconFormula | ( |  | ) | `[static]`

static Standard_EXPORT Handle_Units_Lexicon Units::LexiconUnits | ( | const Standard_Boolean | amode = `Standard_True` | ) | `[static]`

static Standard_EXPORT Handle_Units_Dimensions Units::NullDimensions | ( |  | ) | `[static]`

void Units::operator delete | ( | void * | anAddress | ) | `[inline]`

void* Units::operator new | ( | size_t | size | ) | `[inline]`

void* Units::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

static Standard_EXPORT Handle_Units_Quantity Units::Quantity | ( | const Standard_CString | aquantity | ) | `[static]`

static Standard_EXPORT Standard_Real Units::ToSI | ( | const Standard_Real | aData,
|  | const Standard_CString | aUnit,
|  | Handle(Units_Dimensions)& | aDim
| ) | `[static]`

static Standard_EXPORT Standard_Real Units::ToSI | ( | const Standard_Real | aData,
|  | const Standard_CString | aUnit
| ) | `[static]`

static Standard_EXPORT void Units::UnitsFile | ( | const Standard_CString | afile | ) | `[static]`

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

- Units.hxx