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

The ShiftedToken class inherits from Token and
describes tokens which have a gap in addition of
the multiplicative factor. This kind of token
allows the description of linear functions which
do not pass through the origin, of the form :

y = ax +b

where <x> and <y> are the unknown variables,
the mutiplicative factor, and the gap relative
to the ordinate axis.

An example is the tranlation between the Celsius
and Fahrenheit degree of temperature.

#include <Units_ShiftedToken.hxx>

Inheritance diagram for Units_ShiftedToken:
Inheritance graph
[legend]

Public Member Functions

 Units_ShiftedToken (const Standard_CString aword, const Standard_CString amean, const Standard_Real avalue, const Standard_Real amove, const Handle< Units_Dimensions > &adimensions)
 Creates and returns a shifted token. <aword> is a
string containing the available word, <amean> gives
the signification of the token, <avalue> is the
numeric value of the dimension, <amove> is the gap,
and <adimensions> is the dimension of the given word
<aword>.

virtual Handle_Units_Token Creates () const
 Creates and returns a token, which is a ShiftedToken.

Standard_Real Move () const
 Returns the gap <themove>

virtual Standard_Real Multiplied (const Standard_Real avalue) const
 This virtual method is called by the Measurement
methods, to compute the measurement during a
conversion.

virtual Standard_Real Divided (const Standard_Real avalue) const
 This virtual method is called by the Measurement
methods, to compute the measurement during a
conversion.

virtual void Destroy ()
 Destroies the Token

 ~Units_ShiftedToken ()
virtual void Dump (const Standard_Integer ashift, const Standard_Integer alevel) const
 Useful for debugging


Constructor & Destructor Documentation


Member Function Documentation

virtual Handle_Units_Token Units_ShiftedToken::Creates ( ) const [virtual]

Reimplemented from Units_Token.

virtual void Units_ShiftedToken::Destroy ( ) [virtual]

Reimplemented from Units_Token.

virtual Standard_Real Units_ShiftedToken::Divided ( const Standard_Real  avalue) const [virtual]

Reimplemented from Units_Token.

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

Reimplemented from Units_Token.

virtual Standard_Real Units_ShiftedToken::Multiplied ( const Standard_Real  avalue) const [virtual]

Reimplemented from Units_Token.


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