Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Map Class Template Reference

A Map class. More...

#include <Map.h>

Inheritance diagram for Map:

Inheritance graph
[legend]
Collaboration diagram for Map:

Collaboration graph
[legend]
List of all members.

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.


Detailed Description

template<class Word, class Definition, class WordList = vector<Word>, class DefList = vector<Definition>> class Map

A Map class.

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.


The documentation for this class was generated from the following file:
Generated at Wed May 2 00:24:44 2001 for API by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001