Concordia
WordMap Class Reference

#include <word_map.hpp>

Public Member Functions

 WordMap () throw (ConcordiaException)
 
virtual ~WordMap ()
 
INDEX_CHARACTER_TYPE getWordCode (const std::string &word) throw (ConcordiaException)
 

Detailed Description

Class representing dictionary for word to integer encoding.

Constructor & Destructor Documentation

WordMap::WordMap ( )
throw (ConcordiaException
)
explicit

Constructor.

WordMap::~WordMap ( )
virtual

Destructor.

Member Function Documentation

INDEX_CHARACTER_TYPE WordMap::getWordCode ( const std::string &  word)
throw (ConcordiaException
)

Gets the integer code of a token. If the token is found in the dictionary, the dictionary code is returned. If not, the word is added to the dictionary and its newly created code is returned.

Parameters
wordtoken to generate the code
Returns
code of the token

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