Main Page   Class Hierarchy   Compound List   File List   Compound Members  

HashBase Class Reference

Inheritance diagram for HashBase:

HashCMStateSet HashPtr HashXMLCh List of all members.

Public Methods

virtual unsigned int getHashVal (const void *const key, unsigned int mod)=0
virtual bool equals (const void *const key1, const void *const key2)=0

Detailed Description

The HashBase interface is the general outline of a hasher. Hashers are used in RefHashTableOf hashtables to hash any type of key. An examples is the HashXMLCh class which is designed to produce hash values for XMLCh* strings. Any hasher inheriting from HashBase may be specified when the RefHashTableOf hashtable is constructed.


Member Function Documentation

virtual bool HashBase::equals const void *const    key1,
const void *const    key2
[pure virtual]
 

Compares two keys and determines if they are semantically equal

Parameters:
key1 the first key to be compared
key2 the second key to be compared
Returns:
true if they are equal

Implemented in HashCMStateSet, HashPtr, and HashXMLCh.

virtual unsigned int HashBase::getHashVal const void *const    key,
unsigned int    mod
[pure virtual]
 

Returns a hash value based on the key

Parameters:
key the key to be hashed
mod the modulus the hasher should use

Implemented in HashCMStateSet, HashPtr, and HashXMLCh.


The documentation for this class was generated from the following file:
Generated on Tue Nov 19 09:36:41 2002 by doxygen1.3-rc1