#include <word_alphabet.h>
ZGen::Engine::WordAlphabet::WordAlphabet |
( |
| ) |
|
ZGen::Engine::WordAlphabet::~WordAlphabet |
( |
| ) |
|
const char * ZGen::Engine::WordAlphabet::decode |
( |
int |
id | ) |
const |
|
virtual |
Get the name for a given index.
- Parameters
-
- Returns
- const char* Return the pointer to the name. If the index is not in legal range, NULL is returned.
Implements ZGen::Engine::MutableAlphabet.
int ZGen::Engine::WordAlphabet::encode |
( |
const char * |
name | ) |
const |
|
virtual |
int ZGen::Engine::WordAlphabet::insert |
( |
const char * |
name | ) |
|
|
virtual |
Insert a token into the alphabet.
- Parameters
-
- Returns
- int Return 1 if the word doesn't exist in the alphabet, otherwise 0.
Implements ZGen::Engine::MutableAlphabet.
bool ZGen::Engine::WordAlphabet::load |
( |
std::istream & |
ifs | ) |
|
Load the word engine from input file stream.
- Parameters
-
[in] | ifs | The input word stream. |
bool ZGen::Engine::WordAlphabet::save |
( |
std::ostream & |
ofs | ) |
const |
friend class boost::serialization::access |
|
friend |
The documentation for this class was generated from the following files: