Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvHashTableBase Class Reference

#include <wvhashtable.h>

Inherited by WvHashTable< T, K, Accessor, Comparator >.

Collaboration diagram for WvHashTableBase:

[legend]
List of all members.

Detailed Description

The untyped base class of WvHashTable<T>.

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


Constructor & Destructor Documentation

WvHashTableBase::WvHashTableBase (  unsigned  _numslots  )  [protected]
 

Definition at line 41 of file wvhashtable.cc.

References numslots.

virtual WvHashTableBase::~WvHashTableBase (   )  [inline, protected, virtual]
 

Definition at line 96 of file wvhashtable.h.


Member Function Documentation

virtual bool WvHashTableBase::compare (  const void *  key,
const void *  elem
)  const [protected, pure virtual]
 

Implemented in WvHashTable< T, K, Accessor, Comparator >.

Referenced by prevlink().

size_t WvHashTableBase::count (   )  const
 

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(), numslots, and wvslots.

Referenced by count().

void * WvHashTableBase::genfind (  WvListBase *  slots,
const void *  data,
unsigned  hash
)  const [protected]
 

Definition at line 68 of file wvhashtable.cc.

References WvLink::data, genfind(), WvLink::next, and prevlink().

Referenced by genfind().

bool WvHashTableBase::isempty (   )  const
 

Returns true if the hash table is empty.

Returns: true if empty

Definition at line 89 of file wvhashtable.cc.

References WvListBase::isempty(), numslots, and wvslots.

WvHashTableBase& WvHashTableBase::operator= (  const WvHashTableBase &  t  )  [protected]
 

WvLink * WvHashTableBase::prevlink (  WvListBase *  slots,
const void *  data,
unsigned  hash
)  const [protected]
 

Definition at line 52 of file wvhashtable.cc.

References compare(), WvListBase::IterBase::cur(), WvLink::data, WvListBase::IterBase::next(), WvLink::next, numslots, prevlink(), and WvListBase::IterBase::rewind().

Referenced by genfind(), and prevlink().

void WvHashTableBase::setup (   )  [inline, protected]
 

Definition at line 98 of file wvhashtable.h.

Referenced by WvHashTable< T, K, Accessor, Comparator >::WvHashTable().

void WvHashTableBase::shutdown (   )  [inline, protected]
 

Definition at line 100 of file wvhashtable.h.

Referenced by WvHashTable< T, K, Accessor, Comparator >::~WvHashTable().


Member Data Documentation

unsigned WvHashTableBase::numslots
 

Definition at line 107 of file wvhashtable.h.

Referenced by count(), isempty(), WvHashTableBase::IterBase::next(), prevlink(), and WvHashTableBase().

WvListBase* WvHashTableBase::wvslots
 

Definition at line 108 of file wvhashtable.h.

Referenced by count(), isempty(), WvHashTableBase::IterBase::next(), and WvHashTableBase::IterBase::rewind().


The documentation for this class was generated from the following files:
Generated on Tue Oct 5 01:09:27 2004 for WvStreams by doxygen 1.3.7