#include <skHashTable.h>
Inheritance diagram for skTHashTable:
Public Methods | |
skTHashTable (USize size) | |
constructs the table with the given size. | |
skTHashTable () | |
default constructor which constructs a table with 3 entries. | |
~skTHashTable () | |
destructor - destroys the keys and values in the table. | |
void | insertKeyAndValue (TKey * key, TValue * value) |
this method adds the given key and value to the table. More... | |
TValue* | value (const TKey * key) |
returns the value associated with the given key (or 0). | |
void | del (const TKey * key) |
deletes the key and value from the table. | |
void | delKeyNotValue (const TKey * key) |
deletes the key but not the value from the table. | |
void | remove (const TKey * key) |
removes but does not delete the value and key. | |
Protected Methods | |
int | compareKeys (void * key1, void * key2) const |
this method compares two instances of the key. More... | |
void | deleteKey (void * key) |
deletes the given key (casting it appropriately). | |
void | deleteValue (void * value) |
deletes the given value (casting it appropriately). | |
USize | hashKey (void * key) const |
returns a hash value for the given key, calling a global function USize hashKey(TKey * key). |
|
this method compares two instances of the key. It uses the == operator for the class Reimplemented from skHashTable. |
|
this method adds the given key and value to the table. If the key is already in the table, the existing version is first deleted |