OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKernel
Units


Units_Token Class Reference

This class defines an elementary word contained in
a Sentence object.
.

#include <Units_Token.hxx>

Inheritance diagram for Units_Token:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT Units_Token ()
 Creates and returns a empty token.
.
Standard_EXPORT Units_Token (const Standard_CString aword)
 Creates and returns a token. <aword> is a string
containing the available word.
.
Standard_EXPORT Units_Token (const Handle(Units_Token)&atoken)
 Creates and returns a token. <atoken> is copied in
the returned token.
.
Standard_EXPORT Units_Token (const Standard_CString aword, const Standard_CString amean)
 Creates and returns a token. <aword> is a string
containing the available word and <amean> gives the
signification of the token.
.
Standard_EXPORT Units_Token (const Standard_CString aword, const Standard_CString amean, const Standard_Real avalue)
 Creates and returns a token. <aword> is a string
containing the available word, <amean> gives the
signification of the token and <avalue> is the numeric
value of the dimension.
.
Standard_EXPORT Units_Token (const Standard_CString aword, const Standard_CString amean, const Standard_Real avalue, const Handle(Units_Dimensions)&adimension)
 Creates and returns a token. <aword> is a string
containing the available word, <amean> gives the
signification of the token, <avalue> is the numeric
value of the dimension, and <adimensions> is the
dimension of the given word <aword>.
.
virtual Standard_EXPORT Handle_Units_Token Creates () const
 Creates and returns a token, which is a ShiftedToken.
.
Standard_EXPORT Standard_Integer Length () const
 Returns the length of the word.
.
TCollection_AsciiString Word () const
 Returns the string <theword>
.
void Word (const Standard_CString aword)
 Sets the field <theword> to <aword>.
.
TCollection_AsciiString Mean () const
 Returns the significance of the word <theword>, which
is in the field <themean>.
.
void Mean (const Standard_CString amean)
 Sets the field <themean> to <amean>.
.
Standard_Real Value () const
 Returns the value stored in the field <thevalue>.
.
void Value (const Standard_Real avalue)
 Sets the field <thevalue> to <avalue>.
.
Handle_Units_Dimensions Dimensions () const
 Returns the dimensions of the token <thedimensions>.
.
Standard_EXPORT void Dimensions (const Handle(Units_Dimensions)&adimensions)
 Sets the field <thedimensions> to <adimensions>.
.
Standard_EXPORT void Update (const Standard_CString amean)
 Updates the token <me> with the additional
signification <amean> by concatenation of the two
strings <themean> and <amean>. If the two
significations are the same , an information message
is written in the output device.

.
Standard_EXPORT Handle_Units_Token Add (const Standard_Integer aninteger) const
Standard_EXPORT Handle_Units_Token Add (const Handle(Units_Token)&atoken) const
 Returns a token which is the addition of <me> and
another token <atoken>. The addition is possible if
and only if the dimensions are the same.
.
Standard_EXPORT Handle_Units_Token Subtract (const Handle(Units_Token)&atoken) const
 Returns a token which is the subtraction of <me> and
another token <atoken>. The subtraction is possible if
and only if the dimensions are the same.
.
Standard_EXPORT Handle_Units_Token Multiply (const Handle(Units_Token)&atoken) const
 Returns a token which is the product of <me> and
another token <atoken>.
.
virtual Standard_EXPORT Standard_Real Multiplied (const Standard_Real avalue) const
 This virtual method is called by the Measurement
methods, to compute the measurement during a
conversion.
.
Standard_EXPORT Handle_Units_Token Divide (const Handle(Units_Token)&atoken) const
 Returns a token which is the division of <me> by another
token <atoken>.
.
virtual Standard_EXPORT Standard_Real Divided (const Standard_Real avalue) const
 This virtual method is called by the Measurement
methods, to compute the measurement during a
conversion.
.
Standard_EXPORT Handle_Units_Token Power (const Handle(Units_Token)&atoken) const
 Returns a token which is <me> to the power of another
token <atoken>. The computation is possible only if
<atoken> is a dimensionless constant.
.
Standard_EXPORT Handle_Units_Token Power (const Standard_Real anexponent) const
 Returns a token which is <me> to the power of <anexponent>.
.
Standard_EXPORT Standard_Boolean IsEqual (const Standard_CString astring) const
 Returns true if the field <theword> and the string
<astring> are the same, false otherwise.
.
Standard_EXPORT Standard_Boolean IsEqual (const Handle(Units_Token)&atoken) const
 Returns true if the field <theword> and the string
<theword> contained in the token <atoken> are the
same, false otherwise.
.
Standard_Boolean IsNotEqual (const Standard_CString astring) const
 Returns false if the field <theword> and the string
<astring> are the same, true otherwise.
.
Standard_Boolean IsNotEqual (const Handle(Units_Token)&atoken) const
 Returns false if the field <theword> and the string
<theword> contained in the token <atoken> are the
same, true otherwise.
.
Standard_Boolean IsLessOrEqual (const Standard_CString astring) const
 Returns true if the field <theword> is strictly
contained at the beginning of the string <astring>,
false otherwise.
.
Standard_Boolean IsGreater (const Standard_CString astring) const
 Returns false if the field <theword> is strictly
contained at the beginning of the string <astring>,
true otherwise.
.
Standard_Boolean IsGreater (const Handle(Units_Token)&atoken) const
 Returns false if the field <theword> is strictly
contained at the beginning of the string <astring>,
true otherwise.
.
Standard_Boolean IsGreaterOrEqual (const Handle(Units_Token)&atoken) const
 Returns true if the string <astring> is strictly
contained at the beginning of the field <theword>
false otherwise.
.
virtual Standard_EXPORT void Destroy ()
 Destroies the Token
.
 ~Units_Token ()
virtual Standard_EXPORT void Dump (const Standard_Integer ashift, const Standard_Integer alevel) const
 Useful for debugging
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Attributes

TCollection_AsciiString theword
TCollection_AsciiString themean
Standard_Real thevalue
Handle_Units_Dimensions thedimensions

Constructor & Destructor Documentation

Standard_EXPORT Units_Token::Units_Token  ) 
 

Standard_EXPORT Units_Token::Units_Token const Standard_CString  aword  ) 
 

Standard_EXPORT Units_Token::Units_Token const Handle(Units_Token)&  atoken  ) 
 

Standard_EXPORT Units_Token::Units_Token const Standard_CString  aword,
const Standard_CString  amean
 

Standard_EXPORT Units_Token::Units_Token const Standard_CString  aword,
const Standard_CString  amean,
const Standard_Real  avalue
 

Standard_EXPORT Units_Token::Units_Token const Standard_CString  aword,
const Standard_CString  amean,
const Standard_Real  avalue,
const Handle(Units_Dimensions)&  adimension
 

Units_Token::~Units_Token  )  [inline]
 


Member Function Documentation

Standard_EXPORT Handle_Units_Token Units_Token::Add const Handle(Units_Token)&  atoken  )  const
 

Standard_EXPORT Handle_Units_Token Units_Token::Add const Standard_Integer  aninteger  )  const
 

virtual Standard_EXPORT Handle_Units_Token Units_Token::Creates  )  const [virtual]
 

Reimplemented in Units_ShiftedToken.

virtual Standard_EXPORT void Units_Token::Destroy  )  [virtual]
 

Reimplemented in Units_ShiftedToken.

Standard_EXPORT void Units_Token::Dimensions const Handle(Units_Dimensions)&  adimensions  ) 
 

Handle_Units_Dimensions Units_Token::Dimensions  )  const
 

Standard_EXPORT Handle_Units_Token Units_Token::Divide const Handle(Units_Token)&  atoken  )  const
 

virtual Standard_EXPORT Standard_Real Units_Token::Divided const Standard_Real  avalue  )  const [virtual]
 

Reimplemented in Units_ShiftedToken.

virtual Standard_EXPORT void Units_Token::Dump const Standard_Integer  ashift,
const Standard_Integer  alevel
const [virtual]
 

Reimplemented in Units_ShiftedToken.

Standard_EXPORT const Units_Token::Handle Standard_Type   )  const
 

Reimplemented from MMgt_TShared.

Reimplemented in Units_ShiftedToken.

Standard_EXPORT Standard_Boolean Units_Token::IsEqual const Handle(Units_Token)&  atoken  )  const
 

Standard_EXPORT Standard_Boolean Units_Token::IsEqual const Standard_CString  astring  )  const
 

Standard_Boolean Units_Token::IsGreater const Handle(Units_Token)&  atoken  )  const [inline]
 

Standard_Boolean Units_Token::IsGreater const Standard_CString  astring  )  const [inline]
 

Standard_Boolean Units_Token::IsGreaterOrEqual const Handle(Units_Token)&  atoken  )  const [inline]
 

Standard_Boolean Units_Token::IsLessOrEqual const Standard_CString  astring  )  const [inline]
 

Standard_Boolean Units_Token::IsNotEqual const Handle(Units_Token)&  atoken  )  const [inline]
 

Standard_Boolean Units_Token::IsNotEqual const Standard_CString  astring  )  const [inline]
 

Standard_EXPORT Standard_Integer Units_Token::Length  )  const
 

void Units_Token::Mean const Standard_CString  amean  )  [inline]
 

TCollection_AsciiString Units_Token::Mean  )  const [inline]
 

virtual Standard_EXPORT Standard_Real Units_Token::Multiplied const Standard_Real  avalue  )  const [virtual]
 

Reimplemented in Units_ShiftedToken.

Standard_EXPORT Handle_Units_Token Units_Token::Multiply const Handle(Units_Token)&  atoken  )  const
 

Standard_EXPORT Handle_Units_Token Units_Token::Power const Standard_Real  anexponent  )  const
 

Standard_EXPORT Handle_Units_Token Units_Token::Power const Handle(Units_Token)&  atoken  )  const
 

Standard_EXPORT Handle_Units_Token Units_Token::Subtract const Handle(Units_Token)&  atoken  )  const
 

Standard_EXPORT void Units_Token::Update const Standard_CString  amean  ) 
 

void Units_Token::Value const Standard_Real  avalue  )  [inline]
 

Standard_Real Units_Token::Value  )  const [inline]
 

void Units_Token::Word const Standard_CString  aword  )  [inline]
 

TCollection_AsciiString Units_Token::Word  )  const [inline]
 


Field Documentation

Handle_Units_Dimensions Units_Token::thedimensions [private]
 

TCollection_AsciiString Units_Token::themean [private]
 

Standard_Real Units_Token::thevalue [private]
 

TCollection_AsciiString Units_Token::theword [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:14:15 2008 for OpenCASCADE by  doxygen 1.4.1