Class hierarchy Compound list File list Compound Members File Members
Dictionary Class Reference
Word Dictionary. More...
List of all members.
Public Members
- Dictionary ()
- Default Constructor.
- Dictionary (Dictionary& D)
- Copy Constructor.
- virtual ~Dictionary ()
- Destructor.
- Dictionary& operator= (Dictionary& D)
- Assignment operator.
- void addWord (const char* word, int len, Data Value)
- Add a new word to the dictionary.
- void addWord (String& word, Data Value)
- Add a new word to the dictionary.
- int getWord (const char* word, int len, Data& Value)
- Retrieve an association from the Dictionary.
- int getWord (String& word, Data& Value)
- Retrieve an association from the Dictionary.
- int isEmpty ()
- Returns non-zero if there are words in the dictionary.
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()
Dictionary::Dictionary(Dictionary& D)
virtual Dictionary::~Dictionary() [virtual]
Dictionary& Dictionary::operator=(Dictionary& D)
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: