#include <simplehash.h>
Inheritance diagram for SimpleHashTable:
Public Methods | |
SimpleHashTable (uint32 size) | |
uint32 | IntHash (uint32 key) |
R | Find (ptrdiff_t key) |
bool | Insert (ptrdiff_t key, R value) throw (overflow_error) |
Inserts a key,value pair into the hash. Returns false if we try to insert a duplicate key, and returns an exception if hash is full. More... | |
uint32 | GetCount () |
uint32 | Size () |
void | Clear () |
Private Attributes | |
uint32 | size_ |
uint32 | count |
SimpleHashPair< R > * | table |
This simplistic hashtable is designed as a replacement for the STL hashtable, which uses too much memory. The hashtable implements algorithm L in Knuth, Vol.3, p.526 and also uses Knuth's hash function.
Definition at line 46 of file simplehash.h.
|
Definition at line 66 of file simplehash.h. References SimpleHashTable< R >::count, SimpleHashTable< R >::size_, SimpleHashTable< R >::table, and uint32. |
|
Definition at line 74 of file simplehash.h. References SimpleHashTable< R >::count, SimpleHashTable< R >::size_, and SimpleHashTable< R >::table. |
|
Definition at line 80 of file simplehash.h. References SimpleHashTable< R >::IntHash(), SimpleHashTable< R >::size_, SimpleHashTable< R >::table, and uint32. Referenced by WebNode::NormalizeRawLinks(). |
|
Definition at line 54 of file simplehash.h. |
|
Inserts a key,value pair into the hash. Returns false if we try to insert a duplicate key, and returns an exception if hash is full.
Definition at line 96 of file simplehash.h. References uint32. |
|
Definition at line 117 of file simplehash.h. References uint32. Referenced by SimpleHashTable< R >::Find(). |
|
Definition at line 55 of file simplehash.h. |
|
Definition at line 60 of file simplehash.h. Referenced by SimpleHashTable< R >::Clear(), SimpleHashTable< char * >::GetCount(), and SimpleHashTable< R >::SimpleHashTable(). |
|
Definition at line 59 of file simplehash.h. Referenced by SimpleHashTable< R >::Clear(), SimpleHashTable< R >::Find(), SimpleHashTable< R >::SimpleHashTable(), and SimpleHashTable< char * >::Size(). |
|
Definition at line 61 of file simplehash.h. Referenced by SimpleHashTable< R >::Clear(), SimpleHashTable< R >::Find(), and SimpleHashTable< R >::SimpleHashTable(). |