Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Units_ShiftedUnit Class Reference

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>

Inheritance diagram for Units_ShiftedUnit:
Inheritance graph
[legend]

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


Constructor & Destructor Documentation


Member Function Documentation

virtual void Units_ShiftedUnit::Dump ( const Standard_Integer  ashift,
const Standard_Integer  alevel 
) const [virtual]

Reimplemented from Units_Unit.

virtual Handle_Units_Token Units_ShiftedUnit::Token ( ) const [virtual]

Reimplemented from Units_Unit.


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