# FoundationClasses
TKernel
Units

# 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:

[legend]

## Public Member Functions

Standard_EXPORT | Units_Lexicon ()
| Creates an empty instance of Lexicon. .
Standard_EXPORT 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. .
Standard_EXPORT TCollection_AsciiString | FileName () const
| Returns in a AsciiString from TCollection the name of the file. .
virtual Standard_EXPORT Standard_Boolean | UpToDate () const
| Returns true if the file has not changed since the creation of the Lexicon object. Returns false otherwise. .
Standard_EXPORT 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. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Attributes

Handle_TCollection_HAsciiString | thefilename
Standard_Integer | thetime
Handle_Units_TokensSequence | thesequenceoftokens

## Constructor & Destructor Documentation

Standard_EXPORT Units_Lexicon::Units_Lexicon | ( |  | ) |

## Member Function Documentation

Standard_EXPORT void Units_Lexicon::AddToken | ( | const Standard_CString | aword,
|  | const Standard_CString | amean,
|  | const Standard_Real | avalue
| ) |

Standard_EXPORT void Units_Lexicon::Creates | ( | const Standard_CString | afilename | ) |

void Units_Lexicon::Dump | ( |  | ) | const`[inline, virtual]`

| Reimplemented in Units_UnitsLexicon.

Standard_EXPORT TCollection_AsciiString Units_Lexicon::FileName | ( |  | ) | const

Standard_EXPORT const Units_Lexicon::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from MMgt_TShared. Reimplemented in Units_UnitsLexicon.

Handle_Units_TokensSequence Units_Lexicon::Sequence | ( |  | ) | const

virtual Standard_EXPORT Standard_Boolean Units_Lexicon::UpToDate | ( |  | ) | const`[virtual]`

| Reimplemented in Units_UnitsLexicon.

## Field Documentation

Handle_TCollection_HAsciiString Units_Lexicon::thefilename `[private]`

| Reimplemented in Units_UnitsLexicon.

Handle_Units_TokensSequence Units_Lexicon::thesequenceoftokens `[private]`

Standard_Integer Units_Lexicon::thetime `[private]`

| Reimplemented in Units_UnitsLexicon.

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

- Units_Lexicon.hxx
- Units_Lexicon.lxx