-- File: Units_Token.cdl -- Created: Mon Jun 22 17:36:23 1992 -- Author: Gilles DEBARBOUILLE -- ---Copyright: Matra Datavision 1992 class Token from Units inherits TShared from MMgt ---Purpose: This class defines an elementary word contained in -- a Sentence object. uses AsciiString from TCollection, Dimensions from Units is Create returns mutable Token from Units; ---Level: Internal ---Purpose: Creates and returns a empty token. Create(aword : CString) ---Level: Internal ---Purpose: Creates and returns a token. is a string -- containing the available word. returns mutable Token from Units; Create(atoken : Token from Units) ---Level: Internal ---Purpose: Creates and returns a token. is copied in -- the returned token. returns mutable Token from Units; Create(aword , amean : CString) ---Level: Internal ---Purpose: Creates and returns a token. is a string -- containing the available word and gives the -- signification of the token. returns mutable Token from Units; Create(aword , amean : CString ; avalue : Real) ---Level: Internal ---Purpose: 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. returns mutable Token from Units; Create(aword , amean : CString ; avalue : Real ; adimension : Dimensions from Units) ---Level: Internal ---Purpose: 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 . returns mutable Token from Units; Creates(me) returns mutable Token from Units ---Level: Internal ---Purpose: Creates and returns a token, which is a ShiftedToken. is virtual; Length(me) returns Integer ---Level: Internal ---Purpose: Returns the length of the word. is static; Word(me) returns AsciiString from TCollection ---Level: Internal ---C++: inline ---Purpose : Returns the string is static; Word(me : mutable ; aword : CString) ---Level: Internal ---C++: inline ---Purpose: Sets the field to . is static; Mean(me) returns AsciiString from TCollection ---Level: Internal ---C++: inline ---Purpose: Returns the significance of the word , which -- is in the field . is static; Mean(me : mutable ; amean : CString) ---Level: Internal ---C++: inline ---Purpose: Sets the field to . is static; Value(me) returns Real ---Level: Internal ---C++: inline ---Purpose: Returns the value stored in the field . is static; Value(me : mutable ; avalue : Real) ---Level: Internal ---C++: inline ---Purpose: Sets the field to . is static; Dimensions(me) returns mutable Dimensions from Units ---Level: Internal ---C++: inline ---Purpose: Returns the dimensions of the token . is static; Dimensions(me : mutable ; adimensions : Dimensions from Units) ---Level: Internal ---Purpose: Sets the field to . is static; Update(me : mutable ; amean : CString) ---Level: Internal ---Purpose: 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. -- ---Purpose: is static; Add(me ; aninteger : Integer) returns mutable Token from Units ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) operator +(const Handle(Units_Token)&,const Standard_Integer);" ---Purpose: is static; Add(me ; atoken : Token from Units) returns mutable Token from Units ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) operator +(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns a token which is the addition of and -- another token . The addition is possible if -- and only if the dimensions are the same. is static; Subtract(me ; atoken : Token from Units) returns mutable Token from Units ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) operator -(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns a token which is the subtraction of and -- another token . The subtraction is possible if -- and only if the dimensions are the same. is static; Multiply(me ; atoken : Token from Units) returns mutable Token from Units ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) operator *(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns a token which is the product of and -- another token . is static; Multiplied(me ; avalue : Real) ---Level: Internal ---Purpose: This virtual method is called by the Measurement -- methods, to compute the measurement during a -- conversion. returns Real is virtual; Divide(me ; atoken : Token from Units) returns mutable Token from Units ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) operator /(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns a token which is the division of by another -- token . is static; Divided(me ; avalue : Real) ---Level: Internal ---Purpose: This virtual method is called by the Measurement -- methods, to compute the measurement during a -- conversion. returns Real is virtual; Power(me ; atoken : Token from Units) returns mutable Token from Units ---Level: Internal ---Purpose: Returns a token which is to the power of another -- token . The computation is possible only if -- is a dimensionless constant. -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) pow(const Handle(Units_Token)&,const Handle(Units_Token)&);" is static; Power(me ; anexponent : Real) returns mutable Token from Units ---Level: Internal ---Purpose: Returns a token which is to the power of . -- ---C++: alias "friend Standard_EXPORT Handle(Units_Token) pow(const Handle(Units_Token)&,const Standard_Real);" is static; IsEqual(me ; astring : CString) returns Boolean ---Level: Internal -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator ==(const Handle(Units_Token)&,const Standard_CString);" ---Purpose: Returns true if the field and the string -- are the same, false otherwise. is static; IsEqual(me ; atoken : Token from Units) returns Boolean ---Level: Internal -- -- C++: alias "friend Standard_EXPORT Standard_Boolean operator ==(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns true if the field and the string -- contained in the token are the -- same, false otherwise. is static; IsNotEqual(me ; astring : CString) returns Boolean ---Level: Internal ---C++: inline -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator !=(const Handle(Units_Token)&,const Standard_CString);" ---Purpose: Returns false if the field and the string -- are the same, true otherwise. is static; IsNotEqual(me ; atoken : Token from Units) returns Boolean ---Level: Internal ---C++: inline -- -- C++: alias "friend Standard_EXPORT Standard_Boolean operator !=(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns false if the field and the string -- contained in the token are the -- same, true otherwise. is static; IsLessOrEqual(me ; astring : CString) returns Boolean ---Level: Internal ---C++: inline -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator <=(const Handle(Units_Token)&,const Standard_CString);" ---Purpose: Returns true if the field is strictly -- contained at the beginning of the string , -- false otherwise. is static; IsGreater(me ; astring : CString) returns Boolean ---Level: Internal ---C++: inline -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator >(const Handle(Units_Token)&,const Standard_CString);" ---Purpose: Returns false if the field is strictly -- contained at the beginning of the string , -- true otherwise. is static; IsGreater(me ; atoken : Token from Units) returns Boolean ---Level: Internal ---C++: inline -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator >(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns false if the field is strictly -- contained at the beginning of the string , -- true otherwise. is static; IsGreaterOrEqual(me ; atoken : Token from Units) returns Boolean ---Level: Internal ---C++: inline -- ---C++: alias "friend Standard_EXPORT Standard_Boolean operator >=(const Handle(Units_Token)&,const Handle(Units_Token)&);" ---Purpose: Returns true if the string is strictly -- contained at the beginning of the field -- false otherwise. is static; Destroy ( me : mutable ) is virtual; ---Level: Internal ---Purpose: Destroies the Token ---C++: alias ~ Dump(me ; ashift , alevel : Integer) ---Level: Internal ---Purpose: Useful for debugging is virtual; fields theword : AsciiString from TCollection; themean : AsciiString from TCollection; thevalue : Real; thedimensions : Dimensions from Units; end Token;