COVISE Core
|
#include <coMultiHash.h>
Public Member Functions | |
coMultiHash () | |
Default constructor. More... | |
coMultiHash (DATA nullelem) | |
Default constructor with NULL element. More... | |
virtual | ~coMultiHash () |
Destructor. More... | |
int | insert (const KEY &key, const DATA &inData) |
insert an entry More... | |
int | remove (const coHashIter< KEY, DATA > &iter) |
remove an entry More... | |
coHashIter< KEY, DATA > | operator[] (const KEY &key) |
get element More... | |
coHashIter< KEY, DATA > | first () |
get first to step through More... | |
void | clear () |
remove all elements More... | |
int | getNumEntries () const |
get number of entries currently in hash More... | |
const DATA & | find (const KEY &key) const |
get element (only use with preset NULL element!!!) More... | |
unsigned long | getHash (const KEY &key) const |
get hash index, 0 if no element found More... | |
Private Member Functions | |
coMultiHash (const coMultiHash &) | |
Copy-Constructor: NOT IMPLEMENTED. More... | |
coMultiHash & | operator= (const coMultiHash &) |
Assignment operator: NOT IMPLEMENTED. More... | |
Additional Inherited Members | |
Protected Types inherited from covise::coMultiHashBase< KEY, DATA > | |
enum | { EMPTY = 0 , PREVIOUS , USED } |
Protected Member Functions inherited from covise::coMultiHashBase< KEY, DATA > | |
coMultiHashBase () | |
constructor More... | |
coMultiHashBase (DATA nullelem) | |
constructor More... | |
const DATA & | getNullElem () const |
get the NULL element More... | |
virtual | ~coMultiHashBase () |
destructor More... | |
virtual int | insert (const KEY &key, const DATA &inData) |
insert an entry (virtual for non-multi hash) More... | |
int | remove (unsigned long hashIndex) |
remove an entry by hashIndex More... | |
void | removeAll () |
remove an entry by hashIndex More... | |
unsigned long | getHash (const KEY &key) const |
get hash index, 0 if no element found More... | |
DATA & | operator[] (unsigned long hashIndex) |
access element by hash index: assert() correct index !! More... | |
const DATA & | operator[] (unsigned long hashIndex) const |
access element by hash index: assert() correct index !! More... | |
virtual unsigned long | nextHash (unsigned long hashIndex) const |
get next hashIndex to given hashIndex More... | |
int | getNumEntries () const |
get number of entries currently in hash More... | |
virtual unsigned long | hash1 (const KEY &) const =0 |
first hash function (pure virtual) More... | |
virtual unsigned long | hash2 (const KEY &) const =0 |
second hash function (pure virtual) More... | |
virtual bool | equal (const KEY &, const KEY &) const =0 |
KEY1 == KEY2 operation (pure virtual) More... | |
Protected Attributes inherited from covise::coMultiHashBase< KEY, DATA > | |
KEY * | keys |
unsigned char * | entryFlags |
unsigned int | size |
size of the list More... | |
unsigned int | prime |
the prime currently used as the length of the list More... | |
User-Class for Multi-Hasch tables
|
inlineprivate |
Copy-Constructor: NOT IMPLEMENTED.
|
inline |
Default constructor.
|
inline |
Default constructor with NULL element.
|
inlinevirtual |
Destructor.
|
inline |
remove all elements
INLINE const DATA & covise::coMultiHash< KEY, DATA >::find | ( | const KEY & | key | ) | const |
get element (only use with preset NULL element!!!)
|
inline |
get first to step through
INLINE unsigned long covise::coMultiHash< KEY, DATA >::getHash | ( | const KEY & | key | ) | const |
get hash index, 0 if no element found
|
inline |
get number of entries currently in hash
|
inlinevirtual |
insert an entry
Reimplemented from covise::coMultiHashBase< KEY, DATA >.
|
inlineprivate |
Assignment operator: NOT IMPLEMENTED.
|
inline |
get element
|
inline |
remove an entry