Open CASCADE Technology
6.5.4
|
This class is useful to describe units with a
shifted origin in relation to another unit. A well
known example is the Celsius degrees in relation
to Kelvin degrees. The shift of the Celsius origin
is 273.15 Kelvin degrees.
#include <Units_ShiftedUnit.hxx>
Public Member Functions | |
Units_ShiftedUnit (const Standard_CString aname, const Standard_CString asymbol, const Standard_Real avalue, const Standard_Real amove, const Handle< Units_Quantity > &aquantity) | |
Creates and returns a shifted unit. <aname> is the name of the unit, <asymbol> is the usual abbreviation of the unit, <avalue> is the value in relation to the International System of Units, and <amove> is the gap in relation to another unit. For example Celcius dregee of temperature is an instance of ShiftedUnit with <avalue> equal to 1. and <amove> equal to 273.15. | |
Units_ShiftedUnit (const Standard_CString aname, const Standard_CString asymbol) | |
Creates and returns a unit. <aname> is the name of the unit, <asymbol> is the usual abbreviation of the unit. | |
Units_ShiftedUnit (const Standard_CString aname) | |
Creates and returns a unit. <aname> is the name of the unit. | |
void | Move (const Standard_Real amove) |
Sets the field <themove> to <amove> | |
Standard_Real | Move () const |
Returns the shifted value <themove>. | |
virtual Handle_Units_Token | Token () const |
This redefined method returns a ShiftedToken object. | |
virtual void | Dump (const Standard_Integer ashift, const Standard_Integer alevel) const |
Useful for debugging |
Units_ShiftedUnit::Units_ShiftedUnit | ( | const Standard_CString | aname, |
const Standard_CString | asymbol, | ||
const Standard_Real | avalue, | ||
const Standard_Real | amove, | ||
const Handle< Units_Quantity > & | aquantity | ||
) |
Units_ShiftedUnit::Units_ShiftedUnit | ( | const Standard_CString | aname, |
const Standard_CString | asymbol | ||
) |
virtual void Units_ShiftedUnit::Dump | ( | const Standard_Integer | ashift, |
const Standard_Integer | alevel | ||
) | const [virtual] |
Reimplemented from Units_Unit.
void Units_ShiftedUnit::Move | ( | const Standard_Real | amove | ) |
Standard_Real Units_ShiftedUnit::Move | ( | ) | const |
virtual Handle_Units_Token Units_ShiftedUnit::Token | ( | ) | const [virtual] |
Reimplemented from Units_Unit.