Open CASCADE Technology  7.3.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_QuantitiesSequence > QuantitiesSequence () 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 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 void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::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 opencascade::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...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Units_UnitsSystem() [1/2]

Units_UnitsSystem::Units_UnitsSystem ( )

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

◆ Units_UnitsSystem() [2/2]

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

◆ Activate()

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

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

◆ Activates()

void Units_UnitsSystem::Activates ( )

Activates the first unit of all defined system quantities.

◆ ActiveUnit()

TCollection_AsciiString Units_UnitsSystem::ActiveUnit ( const Standard_CString  aquantity) const

Returns for <aquantity> the active unit.

◆ ActiveUnitsSequence()

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.

◆ ConvertSIValueToUserSystem()

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.

◆ ConvertUserSystemValueToSI()

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.

◆ ConvertValueToUserSystem()

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.

◆ Dump()

void Units_UnitsSystem::Dump ( ) const

◆ IsEmpty()

Standard_Boolean Units_UnitsSystem::IsEmpty ( ) const

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

◆ QuantitiesSequence()

Handle< Units_QuantitiesSequence > Units_UnitsSystem::QuantitiesSequence ( ) const

Returns the sequence of refined quantities.

◆ Remove()

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

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

◆ Specify()

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: