Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skTHashTable Template Class Reference

This class overrides the base class to provide type-safety. More...

#include <skHashTable.h>

Inheritance diagram for skTHashTable:

skHashTable skMethodTable skRValueTable List of all members.

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


Detailed Description

template<class TKey, class TValue> template class skTHashTable

This class overrides the base class to provide type-safety.


Member Function Documentation

template<class TKey, class TValue>
TTH_PREFIX int skTHashTable< TKey,TValue >::compareKeys ( void * key1,
void * key2 ) const [inline, protected, virtual]
 

this method compares two instances of the key.

It uses the == operator for the class

Reimplemented from skHashTable.

template<class TKey, class TValue>
TTH_PREFIX void skTHashTable< TKey,TValue >::insertKeyAndValue ( TKey * key,
TValue * value ) [inline]
 

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


The documentation for this class was generated from the following files:
Generated at Thu Jul 5 10:55:42 2001 for Simkin by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000