#include <wvhashtable.h>
Inherited by WvHashTable< T, K, Accessor, Comparator >.
Collaboration diagram for WvHashTableBase:
Putting common code in here allows us to prevent it from being replicated by each template instantiation of WvHashTable<T>.
Definition at line 90 of file wvhashtable.h.
Public Member Functions | |
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 Member Functions | |
WvHashTableBase (unsigned _numslots) | |
virtual | ~WvHashTableBase () |
WvHashTableBase & | operator= (const WvHashTableBase &t) |
void | setup () |
void | shutdown () |
WvLink * | prevlink (WvListBase *slots, const void *data, unsigned hash) const |
void * | genfind (WvListBase *slots, const void *data, unsigned hash) const |
virtual bool | compare (const void *key, const void *elem) const =0 |
|
Definition at line 41 of file wvhashtable.cc. References numslots. |
|
Definition at line 96 of file wvhashtable.h. |
|
Implemented in WvHashTable< T, K, Accessor, Comparator >. Referenced by prevlink(). |
|
Returns the number of elements in the hash table. Returns: the number of elements Definition at line 79 of file wvhashtable.cc. References WvListBase::count(), count(), and wvslots. Referenced by count(). |
|
Definition at line 68 of file wvhashtable.cc. References WvLink::data, WvLink::next, and prevlink(). Referenced by WvHashTable< T, K, Accessor, Comparator >::operator[](). |
|
Returns true if the hash table is empty. Returns: true if empty Definition at line 89 of file wvhashtable.cc. References WvListBase::isempty(), and wvslots. |
|
|
|
Definition at line 52 of file wvhashtable.cc. References compare(), WvListBase::IterBase::cur(), WvLink::data, WvListBase::IterBase::next(), WvLink::next, numslots, and WvListBase::IterBase::rewind(). Referenced by genfind(), WvHashTable< T, K, Accessor, Comparator >::getlink(), and WvHashTable< T, K, Accessor, Comparator >::remove(). |
|
Definition at line 98 of file wvhashtable.h. Referenced by WvHashTable< T, K, Accessor, Comparator >::WvHashTable(). |
|
Definition at line 100 of file wvhashtable.h. Referenced by WvHashTable< T, K, Accessor, Comparator >::~WvHashTable(). |
|
Definition at line 107 of file wvhashtable.h. Referenced by WvHashTableBase::IterBase::next(), prevlink(), and WvHashTableBase(). |
|
Definition at line 108 of file wvhashtable.h. Referenced by count(), isempty(), WvHashTableBase::IterBase::next(), and WvHashTableBase::IterBase::rewind(). |