Open CASCADE Technology 7.8.2.dev
|
This class allows the user to define his own system of units. More...
#include <Units_UnitsSystem.hxx>
Public Member Functions | |
Units_UnitsSystem () | |
Returns an instance of UnitsSystem initialized to the S.I. units system. | |
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 description file. Attempts to find the four following files: $CSF_aName Defaults/.aName $CSF_aName SiteDefaults/.aName $CSF_aName GroupDefaults/.aName $CSF_aName UserDefaults/.aName See : Resource_Manager for the description of this file. | |
Handle< Units_QuantitiesSequence > | QuantitiesSequence () const |
Returns the sequence of refined quantities. | |
Handle< TColStd_HSequenceOfInteger > | ActiveUnitsSequence () const |
Returns a sequence of integer in correspondence with the sequence of quantities, which indicates, for each redefined quantity, the index into the sequence of units, of the active unit. | |
void | Specify (const Standard_CString aquantity, const Standard_CString aunit) |
Specifies for <aquantity> the unit <aunit> used. | |
void | Remove (const Standard_CString aquantity, const Standard_CString aunit) |
Removes for <aquantity> the unit <aunit> used. | |
void | Activate (const Standard_CString aquantity, const Standard_CString aunit) |
Specifies for <aquantity> the unit <aunit> used. | |
void | Activates () |
Activates the first unit of all defined system quantities. | |
TCollection_AsciiString | ActiveUnit (const Standard_CString aquantity) const |
Returns for <aquantity> the active unit. | |
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. | |
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. | |
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. | |
void | Dump () const |
Standard_Boolean | IsEmpty () const |
Returns TRUE if no units has been defined in the system. | |
Public Member Functions inherited from Standard_Transient | |
Standard_Transient () | |
Empty constructor. | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
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. | |
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. | |
Standard_Transient * | This () 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. | |
Standard_Integer | GetRefCount () const noexcept |
Get the reference counter of this object. | |
void | IncrementRefCounter () noexcept |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () noexcept |
Decrements the reference counter of this object; returns the decremented value. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
static constexpr const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
This class allows the user to define his own system of units.
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 description file. Attempts to find the four following files: $CSF_aName
Defaults/.aName $CSF_aName
SiteDefaults/.aName $CSF_aName
GroupDefaults/.aName $CSF_aName
UserDefaults/.aName See : Resource_Manager for the description of this file.
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 correspondence 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.