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

skTHashTable< TKey, TValue > Class Template Reference

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

#include <skHashTable.h>

Inheritance diagram for skTHashTable< TKey, TValue >:

skHashTable List of all members.

Public Member Functions

 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 Member Functions

int compareKeys (const void *key1, const 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 (const 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>
class skTHashTable< TKey, TValue >

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


Member Function Documentation

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

this method compares two instances of the key.

It uses the == operator for the class

Implements skHashTable.

template<class TKey, class TValue>
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

Exceptions:
Symbian - a leaving function


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 20:27:35 2004 for Simkin by doxygen1.3