Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skHashTable Class Reference

HashTable Class with template sub-class for type-safety. More...

#include <skHashTable.h>

Inheritance diagram for skHashTable:

skTHashTable skMethodTable skRValueTable List of all members.

Public Methods

void clear ()
 this clears the entries from the table, but does *not* delete them.

void clearAndDestroyKeys ()
 this clears the list and deletes the keys.

void clearAndDestroyValues ()
 this clears the list and deletes the values.

void clearAndDestroy ()
 this clears the list and deletes both the values and the keys.

USize entries () const
 this returns the number of entries in the table.

virtual ~skHashTable ()
 destructor.


Protected Methods

 skHashTable (USize size)
 Constructor - makes the table an initial size.

void insertKeyAndValue (void * key, void * value)
 puts a new key and value into the table. More...

void* value (void * key) const
 returns the value associated with the given key.

void del (void * key)
 deletes both the key and the value associated with the given key.

void delKeyNotValue (const void * key)
 deletes the key but not the value associated with the given key.

void remove (const void * key)
 removes the entry associated with the given key.

virtual USize hashKey (const void * key) const = 0
 this method is overriden by derived classes and returns a hash value for the given key.

virtual int compareKeys (const void * key1, const void * key2) const = 0
 this method is overriden by derived classes and compares two key values.

virtual void deleteKey (void * key) = 0
 this method is overriden by derived classes and deletes the given key object.

virtual void deleteValue (void * value) = 0
 this method is overriden by derived classes and deletes the given value object.


Friends

class  skHashTableIterator

Detailed Description

HashTable Class with template sub-class for type-safety.


Member Function Documentation

void skHashTable::insertKeyAndValue ( void * key,
void * value ) [protected]
 

puts a new key and value into the table.

If the key already exists, it is first deleted


The documentation for this class was generated from the following files:
Generated at Mon Nov 5 19:22:25 2001 for Simkin by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000