#include <skHashTable.h>
Inheritance diagram for skHashTable:
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 (void * key) |
deletes the key but not the value associated with the given key. | |
void | remove (void * key) |
removes the entry associated with the given key. | |
virtual USize | hashKey (void * key) const = 0 |
this method is overriden by derived classes and returns a hash value for the given key. | |
virtual int | compareKeys (void * key1, 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 |
|
puts a new key and value into the table. If the key already exists, it is first deleted |