#include <skHashTable.h>
Inheritance diagram for skHashTable:
Public Member Functions | |
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 Member Functions | |
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. | |
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 |
Concrete classes are created by instantiating the template sub-class skSTHashTable
|
puts a new key and value into the table. If the key already exists, it is first deleted
|