![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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 char *const aName, const bool Verbose=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_aNameDefaults/.aName $CSF_aNameSiteDefaults/.aName $CSF_aNameGroupDefaults/.aName $CSF_aNameUserDefaults/.aName See : Resource_Manager for the description of this file. | |
| occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > | QuantitiesSequence () const |
| Returns the sequence of refined quantities. | |
| occ::handle< NCollection_HSequence< int > > | 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 char *const aquantity, const char *const aunit) |
| Specifies for <aquantity> the unit <aunit> used. | |
| void | Remove (const char *const aquantity, const char *const aunit) |
| Removes for <aquantity> the unit <aunit> used. | |
| void | Activate (const char *const aquantity, const char *const aunit) |
| Specifies for <aquantity> the unit <aunit> used. | |
| void | Activates () |
| Activates the first unit of all defined system quantities. | |
| TCollection_AsciiString | ActiveUnit (const char *const aquantity) const |
| Returns for <aquantity> the active unit. | |
| double | ConvertValueToUserSystem (const char *const aquantity, const double avalue, const char *const 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. | |
| double | ConvertSIValueToUserSystem (const char *const aquantity, const double 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. | |
| double | ConvertUserSystemValueToSI (const char *const aquantity, const double 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 |
| bool | 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 ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | 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. | |
| bool | IsKind (const char *const 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. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| 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.
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_aNameDefaults/.aName $CSF_aNameSiteDefaults/.aName $CSF_aNameGroupDefaults/.aName $CSF_aNameUserDefaults/.aName See : Resource_Manager for the description of this file.
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 char *const | aquantity | ) | const |
Returns for <aquantity> the active unit.
| occ::handle< NCollection_HSequence< int > > 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.
| double Units_UnitsSystem::ConvertSIValueToUserSystem | ( | const char *const | aquantity, |
| const double | 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.
| double Units_UnitsSystem::ConvertUserSystemValueToSI | ( | const char *const | aquantity, |
| const double | 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.
| double Units_UnitsSystem::ConvertValueToUserSystem | ( | const char *const | aquantity, |
| const double | avalue, | ||
| const char *const | 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 |
| bool Units_UnitsSystem::IsEmpty | ( | ) | const |
Returns TRUE if no units has been defined in the system.
| occ::handle< NCollection_HSequence< occ::handle< Units_Quantity > > > Units_UnitsSystem::QuantitiesSequence | ( | ) | const |
Returns the sequence of refined quantities.
Removes for <aquantity> the unit <aunit> used.
Specifies for <aquantity> the unit <aunit> used.