Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Static Public Member Functions
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_UnitsDictionaryDictionaryOfUnits (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_QuantityQuantity (const char *const aquantity)
 Returns a unique quantity instance corresponding to <aquantity>.
 
static const charFirstQuantity (const char *const aunit)
 Returns the first quantity string founded from the unit <aUnit>.
 
static occ::handle< Units_LexiconLexiconUnits (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_LexiconLexiconFormula ()
 Return a unique instance of LexiconFormula.
 
static occ::handle< Units_DimensionsNullDimensions ()
 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_DimensionsDimensions (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()

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

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

◆ DictionaryOfUnits()

static 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()

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

return the dimension associated to the Type

◆ FirstQuantity()

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

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

◆ FromSI() [1/2]

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

◆ FromSI() [2/2]

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

◆ LexiconFile()

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

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

◆ LexiconFormula()

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

Return a unique instance of LexiconFormula.

◆ LexiconUnits()

static 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()

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

Returns always the same instance of Dimensions.

◆ Quantity()

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

Returns a unique quantity instance corresponding to <aquantity>.

◆ ToSI() [1/2]

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

◆ ToSI() [2/2]

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

◆ UnitsFile()

static 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: