GClasses
|
This is a hash table that uses any object which inherits from HashTableNode as the key. More...
#include <GHashTable.h>
Public Member Functions | |
GNodeHashTable (bool bOwnNodes, size_t nInitialBucketCount) | |
virtual | ~GNodeHashTable () |
virtual size_t | hash (const char *pKey, size_t nBucketCount) |
Computes a hash of the key. | |
virtual bool | areKeysEqual (const char *pKey1, const char *pKey2) |
Returns true iff the two keys are equal. | |
void | add (HashTableNode *pRec) |
Adds an object to this hash table. | |
HashTableNode * | get (HashTableNode *pLikeMe) |
Gets the value for the specified key. | |
Protected Attributes | |
std::vector< HashTableNode * > * | m_pNodes |
This is a hash table that uses any object which inherits from HashTableNode as the key.
GClasses::GNodeHashTable::GNodeHashTable | ( | bool | bOwnNodes, |
size_t | nInitialBucketCount | ||
) |
virtual GClasses::GNodeHashTable::~GNodeHashTable | ( | ) | [virtual] |
void GClasses::GNodeHashTable::add | ( | HashTableNode * | pRec | ) |
Adds an object to this hash table.
virtual bool GClasses::GNodeHashTable::areKeysEqual | ( | const char * | pKey1, |
const char * | pKey2 | ||
) | [inline, virtual] |
Returns true iff the two keys are equal.
Implements GClasses::GHashTableBase.
HashTableNode* GClasses::GNodeHashTable::get | ( | HashTableNode * | pLikeMe | ) | [inline] |
Gets the value for the specified key.
virtual size_t GClasses::GNodeHashTable::hash | ( | const char * | pKey, |
size_t | nBucketCount | ||
) | [inline, virtual] |
Computes a hash of the key.
Implements GClasses::GHashTableBase.
std::vector<HashTableNode*>* GClasses::GNodeHashTable::m_pNodes [protected] |