#include <HashBase.hpp>
Inheritance diagram for HashBase:
Public Member Functions | |
virtual unsigned int | getHashVal (const void *const key, unsigned int mod)=0 |
virtual bool | equals (const void *const key1, const void *const key2)=0 |
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.
Definition at line 71 of file HashBase.hpp.
virtual bool HashBase::equals | ( | const void *const | key1, | |
const void *const | key2 | |||
) | [pure virtual] |
Compares two keys and determines if they are semantically equal
key1 | the first key to be compared | |
key2 | the second key to be compared |
Implemented in HashCMStateSet, HashPtr, and HashXMLCh.
Referenced by ValueHashTableOf< TVal >::findBucketElem(), RefHashTableOf< TVal >::findBucketElem(), RefHash3KeysIdPool< TVal >::findBucketElem(), RefHash2KeysTableOf< TVal >::findBucketElem(), RefHashTableOf< TVal >::orphanKey(), ValueHashTableOf< TVal >::removeBucketElem(), RefHashTableOf< TVal >::removeBucketElem(), and RefHash2KeysTableOf< TVal >::removeBucketElem().
virtual unsigned int HashBase::getHashVal | ( | const void *const | key, | |
unsigned int | mod | |||
) | [pure virtual] |
Returns a hash value based on the key
key | the key to be hashed | |
mod | the modulus the hasher should use |
Implemented in HashCMStateSet, HashPtr, and HashXMLCh.
Referenced by ValueHashTableOf< TVal >::findBucketElem(), RefHashTableOf< TVal >::findBucketElem(), RefHash3KeysIdPool< TVal >::findBucketElem(), RefHash2KeysTableOf< TVal >::findBucketElem(), RefHashTableOf< TVal >::orphanKey(), RefHashTableOf< TVal >::rehash(), ValueHashTableOf< TVal >::removeBucketElem(), RefHashTableOf< TVal >::removeBucketElem(), and RefHash2KeysTableOf< TVal >::removeBucketElem().