All Categories  Class Hierarchy  This Category  Previous  Next  Indexes

Miscellaneous Class CATDMUsrUnits

CATDMUsrUnits
 


public class CATDMUsrUnits

Units management.

A physical data stored in VPM may be associated to a magnitude (via the administrator profile). The purpose of this class is to provide a way to express a value in a specified unit.

A magnitude is described in the CATUNI.dcls declarative series. It has the following characteristics :

Each unit has the following characteristics :


Method Index


o getActiveUnit(CATUnicodeString&,CATUnicodeString&)
Retrieve the currently active unit for a given magnitude.
o getDisplayableValue(double,CATUnicodeString&,CATUnicodeString&)
Retrieve the displayable form of a value with an associated magnitude.
o getDisplayableValue(double,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Retrieve the displayable form of a value with an associated magnitude with a given unit.
o getMagnitudeUserName(CATUnicodeString&,CATUnicodeString&)
Retrieve the user name for a given magnitude.
o getUnitSymbol(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Retrieve the symbol for a given unit.
o getUnitUserName(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Retrieve the user name for a given unit.

Methods


o getActiveUnit
public static Error getActiveUnit( const CATUnicodeString& iMagnitude,
CATUnicodeString& oActiveUnit)
Retrieve the currently active unit for a given magnitude.
Parameters:
iMagnitude
Magnitude system name.
oActiveUnit
Currently active unit system name.
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.
o getDisplayableValue
public static Error getDisplayableValue(double iValue,
const CATUnicodeString& iMagnitude,
CATUnicodeString& oDisplayableValue)
Retrieve the displayable form of a value with an associated magnitude.
Parameters:
iValue
Numerical value in storage unit.
iMagnitude
Magnitude system name.
oDisplayableValue
Value converted towards the active unit (including the unit symbol when relevant).
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.
o getDisplayableValue
public static Error getDisplayableValue(double iValue,
const CATUnicodeString& iMagnitude,
const CATUnicodeString& iUnit,
CATUnicodeString& oDisplayableValue)
Retrieve the displayable form of a value with an associated magnitude with a given unit.
Parameters:
iValue
Numerical value in storage unit.
iMagnitude
Magnitude system name.
iUnit
Unit system name.
oDisplayableValue
Value converted towards the given unit (including the unit symbol when relevant).
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.
o getMagnitudeUserName
public static Error getMagnitudeUserName( const CATUnicodeString& iMagnitude,
CATUnicodeString& oMagnitudeUName)
Retrieve the user name for a given magnitude.
Parameters:
iMagnitude
Magnitude system name.
oMagnitudeUName
Magnitude user name (as set in the CATUNI.dcls declarative series).
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.
o getUnitSymbol
public static Error getUnitSymbol( const CATUnicodeString& iMagnitude,
const CATUnicodeString& iUnit,
CATUnicodeString& oUnitSymbol)
Retrieve the symbol for a given unit.
Parameters:
iMagnitude
Magnitude system name.
iUnit
Unit system name.
oUnitSymbol
Unit symbol (as set in the CATUNI.dcls declarative series).
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.
o getUnitUserName
public static Error getUnitUserName( const CATUnicodeString& iMagnitude,
const CATUnicodeString& iUnit,
CATUnicodeString& oUnitUName)
Retrieve the user name for a given unit.
Parameters:
iMagnitude
Magnitude system name.
iUnit
Unit system name.
oUnitUName
Unit user name (as set in the CATUNI.dcls declarative series).
Returns:
Error structure. The short and long messages are valuated, their de-allocation (using the delete[] operator) is the responsibility of the calling method.

This object is included in the file: CATDMUsrUnits.h
If needed, your Imakefile.mk should include the module: LV001BAS

Copyright © 2003, Dassault Systèmes. All rights reserved.