class skHashTable

HashTable Class with template sub-class for type-safety

Inheritance:

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
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
this method is overriden by derived classes and returns a hash value for the given key
virtual int compareKeys(void * key1, void * key2) const
this method is overriden by derived classes and compares two key values
virtual void deleteKey(void * key)
this method is overriden by derived classes and deletes the given key object
virtual void deleteValue(void * value)
this method is overriden by derived classes and deletes the given value object

Documentation

HashTable Class with template sub-class for type-safety
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

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. If the key already exists, it is first deleted

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
this method is overriden by derived classes and returns a hash value for the given key

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

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

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


Direct child classes:
skTHashTable

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