Open CASCADE Technology  7.5.0
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 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. More...
 
static void LexiconFile (const Standard_CString afile)
 Defines the location of the file containing the lexicon useful in manipulating composite units. More...
 
static Handle< Units_UnitsDictionaryDictionaryOfUnits (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. More...
 
static Handle< Units_QuantityQuantity (const Standard_CString aquantity)
 Returns a unique quantity instance corresponding to <aquantity>. More...
 
static Standard_CString FirstQuantity (const Standard_CString aunit)
 Returns the first quantity string founded from the unit <aUnit>. More...
 
static Handle< Units_LexiconLexiconUnits (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. More...
 
static Handle< Units_LexiconLexiconFormula ()
 Return a unique instance of LexiconFormula. More...
 
static Handle< Units_DimensionsNullDimensions ()
 Returns always the same instance of Dimensions. More...
 
static Standard_Real Convert (const Standard_Real avalue, const Standard_CString afirstunit, const Standard_CString asecondunit)
 Converts <avalue> expressed in <afirstunit> into the <asecondunit>. More...
 
static Standard_Real ToSI (const Standard_Real aData, const Standard_CString aUnit)
 
static Standard_Real ToSI (const Standard_Real aData, const Standard_CString aUnit, Handle< Units_Dimensions > &aDim)
 
static Standard_Real FromSI (const Standard_Real aData, const Standard_CString aUnit)
 
static Standard_Real FromSI (const Standard_Real aData, const Standard_CString aUnit, Handle< Units_Dimensions > &aDim)
 
static Handle< Units_DimensionsDimensions (const Standard_CString aType)
 return the dimension associated to the Type More...
 

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 Standard_Real Units::Convert ( const Standard_Real  avalue,
const Standard_CString  afirstunit,
const Standard_CString  asecondunit 
)
static

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

◆ DictionaryOfUnits()

static Handle< Units_UnitsDictionary > Units::DictionaryOfUnits ( const Standard_Boolean  amode = Standard_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 Handle< Units_Dimensions > Units::Dimensions ( const Standard_CString  aType)
static

return the dimension associated to the Type

◆ FirstQuantity()

static Standard_CString Units::FirstQuantity ( const Standard_CString  aunit)
static

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

◆ FromSI() [1/2]

static Standard_Real Units::FromSI ( const Standard_Real  aData,
const Standard_CString  aUnit 
)
static

◆ FromSI() [2/2]

static Standard_Real Units::FromSI ( const Standard_Real  aData,
const Standard_CString  aUnit,
Handle< Units_Dimensions > &  aDim 
)
static

◆ LexiconFile()

static void Units::LexiconFile ( const Standard_CString  afile)
static

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

◆ LexiconFormula()

static Handle< Units_Lexicon > Units::LexiconFormula ( )
static

Return a unique instance of LexiconFormula.

◆ LexiconUnits()

static Handle< Units_Lexicon > Units::LexiconUnits ( const Standard_Boolean  amode = Standard_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 Handle< Units_Dimensions > Units::NullDimensions ( )
static

Returns always the same instance of Dimensions.

◆ Quantity()

static Handle< Units_Quantity > Units::Quantity ( const Standard_CString  aquantity)
static

Returns a unique quantity instance corresponding to <aquantity>.

◆ ToSI() [1/2]

static Standard_Real Units::ToSI ( const Standard_Real  aData,
const Standard_CString  aUnit 
)
static

◆ ToSI() [2/2]

static Standard_Real Units::ToSI ( const Standard_Real  aData,
const Standard_CString  aUnit,
Handle< Units_Dimensions > &  aDim 
)
static

◆ UnitsFile()

static void Units::UnitsFile ( const Standard_CString  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: