#include <WordSet.hpp>
Inheritance diagram for lemur::utility::WordSet:
Public Member Functions | |
WordSet () | |
WordSet (const string &filename) | |
Create object, and load set from file. | |
~WordSet () | |
void | load (const string &filename) |
Load a set from file. Does not clear the set first. | |
void | add (const char *word) |
Add a word (char *) to the set. | |
bool | contains (const char *word) const |
Check for the existence of a word in the set. | |
void | clear () |
Empty the set and free memory. | |
Protected Attributes | |
set< char *, lt_str > | words |
string | lastfile |
A generic class that provides a neat and easy to use wrapper to a hash_set<char *>. It can load items in the set from a file (one item per line). It also handles its own memory conveniently.
|
|
|
Create object, and load set from file.
|
|
|
|
Add a word (char *) to the set.
|
|
Empty the set and free memory.
|
|
Check for the existence of a word in the set.
|
|
Load a set from file. Does not clear the set first.
|
|
|
|
The set used to store words. once a word is stored, we do not change it |