Class hierarchy   Compound list   File list   Compound Members   File 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(Dictionary& D)

Copy Constructor.

virtual Dictionary::~Dictionary() [virtual]

Destructor.

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

Assignment operator.

void Dictionary::addWord(const char* word, int len, 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(String& word, 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, 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(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()

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


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