Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

WordSet Class Reference

A generic class that provides a neat and easy to use wrapper to a hash_set<char *>. More...

#include <WordSet.hpp>

Inheritance diagram for WordSet:

Stopper List of all members.

Public Methods

 WordSet ()
 WordSet (char *filename)
 Create object, and load set from file.

 ~WordSet ()
void load (char *filename)
 Load a set from file. Does not clear the set first.

void add (char *word)
 Add a word (char *) to the set.

bool contains (char *word)
 Check for the existence of a word in the set.

void clear ()
 Empty the set and free memory.


Protected Attributes

set<char *, lt_strwords
 The set used to store words.


Detailed Description

A generic class that provides a neat and easy to use wrapper to a hash_set<char *>.

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.


Constructor & Destructor Documentation

WordSet::WordSet ( )
 

WordSet::WordSet ( char * filename )
 

Create object, and load set from file.

WordSet::~WordSet ( )
 


Member Function Documentation

void WordSet::add ( char * word )
 

Add a word (char *) to the set.

void WordSet::clear ( )
 

Empty the set and free memory.

bool WordSet::contains ( char * word )
 

Check for the existence of a word in the set.

void WordSet::load ( char * filename )
 

Load a set from file. Does not clear the set first.


Member Data Documentation

set< char *,lt_str > WordSet::words [protected]
 

The set used to store words.


The documentation for this class was generated from the following files:
Generated at Fri Jul 26 18:23:04 2002 for LEMUR by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000