Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Units_Lexicon Class Reference

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>

Inheritance diagram for Units_Lexicon:
Inheritance graph
[legend]

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.


Constructor & Destructor Documentation


Member Function Documentation

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.


The documentation for this class was generated from the following file: