Open CASCADE Technology
6.5.4
|
This class defines a lexicon useful to analyse and
recognize the different key words included in a
sentence. The lexicon is stored in a sequence of
tokens.
#include <Units_Lexicon.hxx>
Public Member Functions | |
Units_Lexicon () | |
Creates an empty instance of Lexicon. | |
void | Creates (const Standard_CString afilename) |
Reads the file <afilename> to create a sequence of tokens stored in <thesequenceoftokens>. | |
Handle_Units_TokensSequence | Sequence () const |
Returns the first item of the sequence of tokens. | |
TCollection_AsciiString | FileName () const |
Returns in a AsciiString from TCollection the name of the file. | |
virtual Standard_Boolean | UpToDate () const |
Returns true if the file has not changed since the creation of the Lexicon object. Returns false otherwise. | |
void | AddToken (const Standard_CString aword, const Standard_CString amean, const Standard_Real avalue) |
Adds to the lexicon a new token with <aword>, <amean>, <avalue> as arguments. If there is already a token with the field <theword> equal to <aword>, the existing token is updated. | |
virtual void | Dump () const |
Useful for debugging. |
void Units_Lexicon::AddToken | ( | const Standard_CString | aword, |
const Standard_CString | amean, | ||
const Standard_Real | avalue | ||
) |
void Units_Lexicon::Creates | ( | const Standard_CString | afilename | ) |
virtual void Units_Lexicon::Dump | ( | ) | const [virtual] |
Reimplemented in Units_UnitsLexicon.
Handle_Units_TokensSequence Units_Lexicon::Sequence | ( | ) | const |
virtual Standard_Boolean Units_Lexicon::UpToDate | ( | ) | const [virtual] |
Reimplemented in Units_UnitsLexicon.