Open CASCADE Technology  6.9.0
Public Member Functions

Units_UnitsSystem Class Reference

This class allows the user to define his own system of units. More...

#include <Units_UnitsSystem.hxx>

Inheritance diagram for Units_UnitsSystem:
Inheritance graph
[legend]

Public Member Functions

 Units_UnitsSystem ()
 Returns an instance of UnitsSystem initialized to the S.I. units system. More...
 
 Units_UnitsSystem (const Standard_CString aName, const Standard_Boolean Verbose=Standard_False)
 Returns an instance of UnitsSystem initialized to the S.I. units system upgraded by the base system units decription file. Attempts to find the four following files: $CSF_aNameDefaults/.aName $CSF_aNameSiteDefaults/.aName $CSF_aNameGroupDefaults/.aName $CSF_aNameUserDefaults/.aName See : Resource_Manager for the description of this file. More...
 
Handle< Units_QuantitiesSequenceQuantitiesSequence () const
 Returns the sequence of refined quantities. More...
 
Handle
< TColStd_HSequenceOfInteger
ActiveUnitsSequence () const
 Returns a sequence of integer in correspondance with the sequence of quantities, which indicates, for each redefined quantity, the index into the sequence of units, of the active unit. More...
 
void Specify (const Standard_CString aquantity, const Standard_CString aunit)
 Specifies for <aquantity> the unit <aunit> used. More...
 
void Remove (const Standard_CString aquantity, const Standard_CString aunit)
 Removes for <aquantity> the unit <aunit> used. More...
 
void Activate (const Standard_CString aquantity, const Standard_CString aunit)
 Specifies for <aquantity> the unit <aunit> used. More...
 
void Activates ()
 Activates the first unit of all defined system quantities. More...
 
TCollection_AsciiString ActiveUnit (const Standard_CString aquantity) const
 Returns for <aquantity> the active unit. More...
 
Standard_Real ConvertValueToUserSystem (const Standard_CString aquantity, const Standard_Real avalue, const Standard_CString aunit) const
 Converts a real value <avalue> from the unit <aunit> belonging to the physical dimensions <aquantity> to the corresponding unit of the user system. More...
 
Standard_Real ConvertSIValueToUserSystem (const Standard_CString aquantity, const Standard_Real avalue) const
 Converts the real value <avalue> from the S.I. system of units to the user system of units. <aquantity> is the physical dimensions of the measurement. More...
 
Standard_Real ConvertUserSystemValueToSI (const Standard_CString aquantity, const Standard_Real avalue) const
 Converts the real value <avalue> from the user system of units to the S.I. system of units. <aquantity> is the physical dimensions of the measurement. More...
 
void Dump () const
 
Standard_Boolean IsEmpty () const
 Returns TRUE if no units has been defined in the system. More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

This class allows the user to define his own system of units.

Constructor & Destructor Documentation

Units_UnitsSystem::Units_UnitsSystem ( )

Returns an instance of UnitsSystem initialized to the S.I. units system.

Units_UnitsSystem::Units_UnitsSystem ( const Standard_CString  aName,
const Standard_Boolean  Verbose = Standard_False 
)

Returns an instance of UnitsSystem initialized to the S.I. units system upgraded by the base system units decription file. Attempts to find the four following files: $CSF_aNameDefaults/.aName $CSF_aNameSiteDefaults/.aName $CSF_aNameGroupDefaults/.aName $CSF_aNameUserDefaults/.aName See : Resource_Manager for the description of this file.

Member Function Documentation

void Units_UnitsSystem::Activate ( const Standard_CString  aquantity,
const Standard_CString  aunit 
)

Specifies for <aquantity> the unit <aunit> used.

void Units_UnitsSystem::Activates ( )

Activates the first unit of all defined system quantities.

TCollection_AsciiString Units_UnitsSystem::ActiveUnit ( const Standard_CString  aquantity) const

Returns for <aquantity> the active unit.

Handle< TColStd_HSequenceOfInteger > Units_UnitsSystem::ActiveUnitsSequence ( ) const

Returns a sequence of integer in correspondance with the sequence of quantities, which indicates, for each redefined quantity, the index into the sequence of units, of the active unit.

Standard_Real Units_UnitsSystem::ConvertSIValueToUserSystem ( const Standard_CString  aquantity,
const Standard_Real  avalue 
) const

Converts the real value <avalue> from the S.I. system of units to the user system of units. <aquantity> is the physical dimensions of the measurement.

Standard_Real Units_UnitsSystem::ConvertUserSystemValueToSI ( const Standard_CString  aquantity,
const Standard_Real  avalue 
) const

Converts the real value <avalue> from the user system of units to the S.I. system of units. <aquantity> is the physical dimensions of the measurement.

Standard_Real Units_UnitsSystem::ConvertValueToUserSystem ( const Standard_CString  aquantity,
const Standard_Real  avalue,
const Standard_CString  aunit 
) const

Converts a real value <avalue> from the unit <aunit> belonging to the physical dimensions <aquantity> to the corresponding unit of the user system.

void Units_UnitsSystem::Dump ( ) const
Standard_Boolean Units_UnitsSystem::IsEmpty ( ) const

Returns TRUE if no units has been defined in the system.

Handle< Units_QuantitiesSequence > Units_UnitsSystem::QuantitiesSequence ( ) const

Returns the sequence of refined quantities.

void Units_UnitsSystem::Remove ( const Standard_CString  aquantity,
const Standard_CString  aunit 
)

Removes for <aquantity> the unit <aunit> used.

void Units_UnitsSystem::Specify ( const Standard_CString  aquantity,
const Standard_CString  aunit 
)

Specifies for <aquantity> the unit <aunit> used.


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