In file /home/blah/darwin2k/src/ddcore/misc/ptrList.h:a generic hash table class
Public Fields

unsigned int nbins
 number of bins

unsigned int mask
 bitmask for nbins

ptrList** bins
 array of ptrLists for each bin
Public Methods

ptrHash(unsigned int desiredSize)
 constructor.

~ptrHash(void)
 destructor.

void computeHashSize(unsigned int desiredSize)
 computes the actual hash size based on the desired size

int isPresent(const void* ptr, unsigned long key)
 returns 1 if pointer is present, using the given key

inline ptrList* getBin(unsigned long key) const
 returns the bin for the given key

ptrList* addBin(unsigned long key, unsigned int size = 10)
 adds a bin for the given key

inline ptrHash* getHash(unsigned long key)
 returns a hash table for the given key.

ptrHash* addHash(unsigned long key, int size)
 adds a ptrHash with desired size of 'size' for the given key.
Documentation
a generic hash table class
 unsigned int nbins
 number of bins
 unsigned int mask
 bitmask for nbins
 ptrList** bins
 array of ptrLists for each bin
 ptrHash(unsigned int desiredSize)
 constructor. Actual size may be greater than desiredSize.
 ~ptrHash(void)
 destructor. Deletes any nonnull bins, but not their contents.
 void computeHashSize(unsigned int desiredSize)
 computes the actual hash size based on the desired size
 int isPresent(const void* ptr, unsigned long key)
 returns 1 if pointer is present, using the given key
 inline ptrList* getBin(unsigned long key) const
 returns the bin for the given key
 ptrList* addBin(unsigned long key, unsigned int size = 10)
 adds a bin for the given key
 inline ptrHash* getHash(unsigned long key)
 returns a hash table for the given key. WARNING: this assumes you're
doing a multidimensional hash table, in which case each bin has a
single element in the list (a ptrHash).
 ptrHash* addHash(unsigned long key, int size)
 adds a ptrHash with desired size of 'size' for the given key.
WARNING: this assumes you're doing a multidimensional hash table,
so each bin has a single element in the list, which is
a ptrHash.
 This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.