GClasses

GClasses::GNodeHashTable Class Reference

This is a hash table that uses any object which inherits from HashTableNode as the key. More...

#include <GHashTable.h>

Inheritance diagram for GClasses::GNodeHashTable:
GClasses::GHashTableBase

List of all members.

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.
HashTableNodeget (HashTableNode *pLikeMe)
 Gets the value for the specified key.

Protected Attributes

std::vector< HashTableNode * > * m_pNodes

Detailed Description

This is a hash table that uses any object which inherits from HashTableNode as the key.


Constructor & Destructor Documentation

GClasses::GNodeHashTable::GNodeHashTable ( bool  bOwnNodes,
size_t  nInitialBucketCount 
)
virtual GClasses::GNodeHashTable::~GNodeHashTable ( ) [virtual]

Member Function Documentation

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.


Member Data Documentation