Open CASCADE Technology
7.7.0
|
This class describes all the facilities to manipulate and compute units contained in a string expression. More...
#include <Units_UnitSentence.hxx>
Public Member Functions | |
Units_UnitSentence (const Standard_CString astring) | |
Creates and returns a UnitSentence. The string <astring> describes in natural language the unit or the composed unit to be analysed. More... | |
Units_UnitSentence (const Standard_CString astring, const Handle< Units_QuantitiesSequence > &aquantitiessequence) | |
Creates and returns a UnitSentence. The string <astring> describes in natural language the unit to be analysed. The sequence of physical quantities <asequenceofquantities> describes the available dictionary of units you want to use. More... | |
void | Analyse () |
Analyzes the sequence of tokens created by the constructor to find the true significance of each token. More... | |
void | SetUnits (const Handle< Units_QuantitiesSequence > &aquantitiessequence) |
For each token which represents a unit, finds in the sequence of physical quantities all the characteristics of the unit found. More... | |
Public Member Functions inherited from Units_Sentence | |
Units_Sentence (const Handle< Units_Lexicon > &alexicon, const Standard_CString astring) | |
Creates and returns a Sentence, by analyzing the string <astring> with the lexicon <alexicon>. More... | |
void | SetConstants () |
For each constant encountered, sets the value. More... | |
Handle< Units_TokensSequence > | Sequence () const |
Returns <thesequenceoftokens>. More... | |
void | Sequence (const Handle< Units_TokensSequence > &asequenceoftokens) |
Sets the field <thesequenceoftokens> to <asequenceoftokens>. More... | |
Handle< Units_Token > | Evaluate () |
Computes and returns in a token the result of the expression. More... | |
Standard_Boolean | IsDone () const |
Return True if number of created tokens > 0 (i.e creation of sentence is successful) More... | |
void | Dump () const |
Useful for debugging. More... | |
This class describes all the facilities to manipulate and compute units contained in a string expression.
Units_UnitSentence::Units_UnitSentence | ( | const Standard_CString | astring | ) |
Creates and returns a UnitSentence. The string <astring> describes in natural language the unit or the composed unit to be analysed.
Units_UnitSentence::Units_UnitSentence | ( | const Standard_CString | astring, |
const Handle< Units_QuantitiesSequence > & | aquantitiessequence | ||
) |
Creates and returns a UnitSentence. The string <astring> describes in natural language the unit to be analysed. The sequence of physical quantities <asequenceofquantities> describes the available dictionary of units you want to use.
void Units_UnitSentence::Analyse | ( | ) |
Analyzes the sequence of tokens created by the constructor to find the true significance of each token.
void Units_UnitSentence::SetUnits | ( | const Handle< Units_QuantitiesSequence > & | aquantitiessequence | ) |
For each token which represents a unit, finds in the sequence of physical quantities all the characteristics of the unit found.