Class hierarchy   Compound list   Compound Members  

Dictionary Class Reference

Word Dictionary. More...

List of all members.

Public Members


Detailed Description

Word Dictionary.

An alternative to a Hashtable of subclasses of SimpleString_Containable Provides translation from text word (any string) to a Containable subclass


Member Function Documentation

Dictionary::Dictionary()

Default Constructor.

Dictionary::Dictionary(const Dictionary& D)

Copy Constructor.

virtual Dictionary::~Dictionary() [virtual]

Destructor.

Dictionary& Dictionary::operator=(const Dictionary& D)

Assignment operator.

void Dictionary::addWord(const char* word, const int len, const Data Value)

Add a new word to the dictionary.

len indicates the length of the word. Value is the data associated with the word. Method throws WordExists if the word is already in the dictionary.

void Dictionary::addWord(const String& word, const Data Value)

Add a new word to the dictionary.

Value is the data associated with the word. Method throws WordExists if the word is already in the dictionary.

int Dictionary::getWord(const char* word, const int len, Data& Value)

Retrieve an association from the Dictionary.

Value will be set if the word is found. Method throws WordNotFound if the word is not in the dictionary.

int Dictionary::getWord(const String& word, Data& Value)

Retrieve an association from the Dictionary.

Value will be set if the word is found. Method throws WordNotFound if the word is not in the dictionary.

int Dictionary::isEmpty() const

Returns non-zero if there are words in the dictionary.


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