Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
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. More...

#include <Units.hxx>

Static Public Member Functions

static void UnitsFile (const char *const 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 void LexiconFile (const char *const afile)
 Defines the location of the file containing the lexicon useful in manipulating composite units.
static occ::handle< Units_UnitsDictionary > DictionaryOfUnits (const bool amode=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 occ::handle< Units_Quantity > Quantity (const char *const aquantity)
 Returns a unique quantity instance corresponding to <aquantity>.
static const char * FirstQuantity (const char *const aunit)
 Returns the first quantity string founded from the unit <aUnit>.
static occ::handle< Units_Lexicon > LexiconUnits (const bool amode=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 occ::handle< Units_Lexicon > LexiconFormula ()
 Return a unique instance of LexiconFormula.
static occ::handle< Units_Dimensions > NullDimensions ()
 Returns always the same instance of Dimensions.
static double Convert (const double avalue, const char *const afirstunit, const char *const asecondunit)
 Converts <avalue> expressed in <afirstunit> into the <asecondunit>.
static double ToSI (const double aData, const char *const aUnit)
static double ToSI (const double aData, const char *const aUnit, occ::handle< Units_Dimensions > &aDim)
static double FromSI (const double aData, const char *const aUnit)
static double FromSI (const double aData, const char *const aUnit, occ::handle< Units_Dimensions > &aDim)
static occ::handle< Units_Dimensions > Dimensions (const char *const aType)
 return the dimension associated to the Type

Detailed Description

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.

Member Function Documentation

◆ Convert()

double Units::Convert ( const double avalue,
const char *const afirstunit,
const char *const asecondunit )
static

Converts <avalue> expressed in <afirstunit> into the <asecondunit>.

◆ DictionaryOfUnits()

occ::handle< Units_UnitsDictionary > Units::DictionaryOfUnits ( const bool amode = false)
static

Returns a unique instance of the dictionary of units. If <amode> is True, then it forces the recomputation of the dictionary of units.

◆ Dimensions()

occ::handle< Units_Dimensions > Units::Dimensions ( const char *const aType)
static

return the dimension associated to the Type

◆ FirstQuantity()

const char * Units::FirstQuantity ( const char *const aunit)
static

Returns the first quantity string founded from the unit <aUnit>.

◆ FromSI() [1/2]

double Units::FromSI ( const double aData,
const char *const aUnit )
static

◆ FromSI() [2/2]

double Units::FromSI ( const double aData,
const char *const aUnit,
occ::handle< Units_Dimensions > & aDim )
static

◆ LexiconFile()

void Units::LexiconFile ( const char *const afile)
static

Defines the location of the file containing the lexicon useful in manipulating composite units.

◆ LexiconFormula()

occ::handle< Units_Lexicon > Units::LexiconFormula ( )
static

Return a unique instance of LexiconFormula.

◆ LexiconUnits()

occ::handle< Units_Lexicon > Units::LexiconUnits ( const bool amode = true)
static

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.

◆ NullDimensions()

occ::handle< Units_Dimensions > Units::NullDimensions ( )
static

Returns always the same instance of Dimensions.

◆ Quantity()

occ::handle< Units_Quantity > Units::Quantity ( const char *const aquantity)
static

Returns a unique quantity instance corresponding to <aquantity>.

◆ ToSI() [1/2]

double Units::ToSI ( const double aData,
const char *const aUnit )
static

◆ ToSI() [2/2]

double Units::ToSI ( const double aData,
const char *const aUnit,
occ::handle< Units_Dimensions > & aDim )
static

◆ UnitsFile()

void Units::UnitsFile ( const char *const afile)
static

Defines the location of the file containing all the information useful in creating the dictionary of all the units known to the system.


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