// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Units_Token_HeaderFile #define _Units_Token_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Units_Token_HeaderFile #include #endif #ifndef _TCollection_AsciiString_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Handle_Units_Dimensions_HeaderFile #include #endif #ifndef _MMgt_TShared_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif class Units_Dimensions; //! This class defines an elementary word contained in
//! a Sentence object.
class Units_Token : public MMgt_TShared { public: //! Creates and returns a empty token.
Standard_EXPORT Units_Token(); //! Creates and returns a token. is a string
//! containing the available word.
Standard_EXPORT Units_Token(const Standard_CString aword); //! Creates and returns a token. is copied in
//! the returned token.
Standard_EXPORT Units_Token(const Handle(Units_Token)& atoken); //! Creates and returns a token. is a string
//! containing the available word and gives the
//! signification of the token.
Standard_EXPORT Units_Token(const Standard_CString aword,const Standard_CString amean); //! Creates and returns a token. is a string
//! containing the available word, gives the
//! signification of the token and is the numeric
//! value of the dimension.
Standard_EXPORT Units_Token(const Standard_CString aword,const Standard_CString amean,const Standard_Real avalue); //! Creates and returns a token. is a string
//! containing the available word, gives the
//! signification of the token, is the numeric
//! value of the dimension, and is the
//! dimension of the given word .
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, which is a ShiftedToken.
Standard_EXPORT virtual Handle_Units_Token Creates() const; //! Returns the length of the word.
Standard_EXPORT Standard_Integer Length() const; //! Returns the string
TCollection_AsciiString Word() const; //! Sets the field to .
void Word(const Standard_CString aword) ; //! Returns the significance of the word , which
//! is in the field .
TCollection_AsciiString Mean() const; //! Sets the field to .
void Mean(const Standard_CString amean) ; //! Returns the value stored in the field .
Standard_Real Value() const; //! Sets the field to .
void Value(const Standard_Real avalue) ; //! Returns the dimensions of the token .
Handle_Units_Dimensions Dimensions() const; //! Sets the field to .
Standard_EXPORT void Dimensions(const Handle(Units_Dimensions)& adimensions) ; //! Updates the token with the additional
//! signification by concatenation of the two
//! strings and . If the two
//! significations are the same , an information message
//! is written in the output device.
//!
Standard_EXPORT void Update(const Standard_CString amean) ; Standard_EXPORT Handle_Units_Token Add(const Standard_Integer aninteger) const; //! Returns a token which is the addition of and
//! another token . The addition is possible if
//! and only if the dimensions are the same.
Standard_EXPORT Handle_Units_Token Add(const Handle(Units_Token)& atoken) const; //! Returns a token which is the subtraction of and
//! another token . The subtraction 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 product of and
//! another token .
Standard_EXPORT Handle_Units_Token Multiply(const Handle(Units_Token)& atoken) const; //! This virtual method is called by the Measurement
//! methods, to compute the measurement during a
//! conversion.
Standard_EXPORT virtual Standard_Real Multiplied(const Standard_Real avalue) const; //! Returns a token which is the division of by another
//! token .
Standard_EXPORT Handle_Units_Token Divide(const Handle(Units_Token)& atoken) const; //! This virtual method is called by the Measurement
//! methods, to compute the measurement during a
//! conversion.
Standard_EXPORT virtual Standard_Real Divided(const Standard_Real avalue) const; //! Returns a token which is to the power of another
//! token . The computation is possible only if
//! is a dimensionless constant.
Standard_EXPORT Handle_Units_Token Power(const Handle(Units_Token)& atoken) const; //! Returns a token which is to the power of .
Standard_EXPORT Handle_Units_Token Power(const Standard_Real anexponent) const; //! Returns true if the field and the string
//! are the same, false otherwise.
Standard_EXPORT Standard_Boolean IsEqual(const Standard_CString astring) const; //! Returns true if the field and the string
//! contained in the token are the
//! same, false otherwise.
Standard_EXPORT Standard_Boolean IsEqual(const Handle(Units_Token)& atoken) const; //! Returns false if the field and the string
//! are the same, true otherwise.
Standard_Boolean IsNotEqual(const Standard_CString astring) const; //! Returns false if the field and the string
//! contained in the token are the
//! same, true otherwise.
Standard_Boolean IsNotEqual(const Handle(Units_Token)& atoken) const; //! Returns true if the field is strictly
//! contained at the beginning of the string ,
//! false otherwise.
Standard_Boolean IsLessOrEqual(const Standard_CString astring) const; //! Returns false if the field is strictly
//! contained at the beginning of the string ,
//! true otherwise.
Standard_Boolean IsGreater(const Standard_CString astring) const; //! Returns false if the field is strictly
//! contained at the beginning of the string ,
//! true otherwise.
Standard_Boolean IsGreater(const Handle(Units_Token)& atoken) const; //! Returns true if the string is strictly
//! contained at the beginning of the field
//! false otherwise.
Standard_Boolean IsGreaterOrEqual(const Handle(Units_Token)& atoken) const; //! Destroies the Token
Standard_EXPORT virtual void Destroy() ; ~Units_Token() { Destroy(); } //! Useful for debugging
Standard_EXPORT virtual void Dump(const Standard_Integer ashift,const Standard_Integer alevel) const; DEFINE_STANDARD_RTTI(Units_Token) protected: private: TCollection_AsciiString theword; TCollection_AsciiString themean; Standard_Real thevalue; Handle_Units_Dimensions thedimensions; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif