template <class TKey,class TValue> class skTHashTable : public skHashTable

This class overrides the base class to provide type-safety

Inheritance:

skTHashTable < skHashTable


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
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
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)

Inherited from skHashTable:

Public Methods

void clear()
void clearAndDestroyKeys()
void clearAndDestroyValues()
void clearAndDestroy()
USize entries() const

Documentation

This class overrides the base class to provide type-safety
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. If the key is already in the table, the existing version is first deleted

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

int compareKeys(void * key1, void * key2) const
this method compares two instances of the key. It uses the == operator for the class

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)


Direct child classes:
skMethodTable

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de