WvStreams
|
Classes | |
class | Iter |
Public Types | |
typedef class WvSorter< T, WvHashTableBase, WvHashTableBase::IterBase > | Sorter |
Public Member Functions | |
WvHashTable (unsigned _numslots) | |
Creates a hash table. | |
WvList< T > * | sl () |
void | add (T *data, bool autofree) |
WvLink * | getlink (const K &key) |
T * | operator[] (const K &key) const |
bool | get_autofree (const K &key) const |
Returns the state of autofree for the element associated with key. | |
bool | get_autofree (const T *data) const |
void | set_autofree (const K &key, bool autofree) |
Sets the state of autofree for the element associated with key. | |
void | set_autofree (const T *data, bool autofree) |
void | remove (const T *data) |
void | zap () |
size_t | count () const |
Returns the number of elements in the hash table. | |
bool | isempty () const |
Returns true if the hash table is empty. | |
Public Attributes | |
unsigned | numslots |
WvListBase * | wvslots |
Protected Types | |
typedef Comparator< K > | MyComparator |
Protected Member Functions | |
unsigned | hash (const T *data) |
virtual bool | compare (const void *key, const void *elem) const |
void | setup () |
void | shutdown () |
WvLink * | prevlink (WvListBase *slots, const void *data, unsigned hash) const |
void * | genfind (WvListBase *slots, const void *data, unsigned hash) const |
Definition at line 168 of file wvhashtable.h.
WvHashTable< T, K, Accessor, Comparator >::WvHashTable | ( | unsigned | _numslots | ) | [inline] |
Creates a hash table.
"numslots" is the suggested number of slots
Definition at line 188 of file wvhashtable.h.
size_t WvHashTableBase::count | ( | ) | const [inherited] |
Returns the number of elements in the hash table.
Returns: the number of elements
Definition at line 51 of file wvhashtable.cc.
bool WvHashTableBase::isempty | ( | ) | const [inherited] |
Returns true if the hash table is empty.
Returns: true if empty
Definition at line 61 of file wvhashtable.cc.