#include <Map.h>
Inheritance diagram for Map:
Public Types | |
typedef map<Word, Definition>::value_type | Pair |
a shorter name. | |
Public Methods | |
bool | Find (const Word &word) const |
Is this word in this dictionary? | |
virtual | ~Map () |
Virtual destructor. | |
Inspectors | |
virtual Definition | Get (const Word &word) const |
Given a word, return it's corresponding definition. | |
virtual WordList | GetWords () const |
Get a list of all the words. | |
virtual DefList | GetDefs () const |
Get a list of all the definitions. | |
Modifiers | |
virtual void | Add (const Word &word, const Definition &definition) |
Add a word and defintion. | |
virtual void | Add (const Pair &newPair) |
Add a new pair (Word, Definition). | |
virtual void | Set (const Word &word, const Definition &definition) |
Set the word's definition. |
This is a class derived from std::map. It just adds some useful functions on top of the standard map class. The template options are for the Word (key) datatype, the Definition (value) datatype, the container datatype (usually STL based, such as vector or list) for the Words and the container datatype for the Definitions.