Implements an abstract interface for all alphabet realizations. More...
#include <Alphabet.h>
Public Member Functions | |
virtual int | getNum (const string &letter) const =0 |
Interface for conversion from the letter name to an integer. | |
virtual string | getLetter (int index) const =0 |
Interface for conversion from an integer index into the corresponding letter name. | |
void | printWord (ostream &out, const Word &w) const |
Output a word in the alphabet letters. | |
Word | readWord (istream &in) const |
Read a word from a stream in the alphabet letters. | |
void | printVector (ostream &out, const vector< Word > &v) const |
Output a vector of words in the alphabet letters. | |
vector< Word > | readVector (istream &in) const |
Read a vector of words from a stream in the alphabet letters. |
Implements an abstract interface for all alphabet realizations.
Definition at line 34 of file Alphabet.h.
virtual string Alphabet::getLetter | ( | int | index | ) | const [pure virtual] |
Interface for conversion from an integer index into the corresponding letter name.
Implemented in InfiniteAlphabet.
virtual int Alphabet::getNum | ( | const string & | letter | ) | const [pure virtual] |
Interface for conversion from the letter name to an integer.
Implemented in InfiniteAlphabet.
void Alphabet::printVector | ( | ostream & | out, | |
const vector< Word > & | v | |||
) | const |
Output a vector of words in the alphabet letters.
void Alphabet::printWord | ( | ostream & | out, | |
const Word & | w | |||
) | const |
Output a word in the alphabet letters.
Referenced by Word::printOn().
vector<Word> Alphabet::readVector | ( | istream & | in | ) | const |
Read a vector of words from a stream in the alphabet letters.
Word Alphabet::readWord | ( | istream & | in | ) | const |
Read a word from a stream in the alphabet letters.