COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Public Member Functions | Private Member Functions | List of all members
covise::coMultiHash< KEY, DATA > Class Template Reference

#include <coHashIter.h>

Inheritance diagram for covise::coMultiHash< KEY, DATA >:
Inheritance graph
[legend]
Collaboration diagram for covise::coMultiHash< KEY, DATA >:
Collaboration graph
[legend]

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...
 
coMultiHashoperator= (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...
 
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...
 

Detailed Description

template<class KEY, class DATA>
class covise::coMultiHash< KEY, DATA >

User-Class for Multi-Hasch tables

Constructor & Destructor Documentation

template<class KEY, class DATA>
covise::coMultiHash< KEY, DATA >::coMultiHash ( const coMultiHash< KEY, DATA > &  )
inlineprivate

Copy-Constructor: NOT IMPLEMENTED.

template<class KEY, class DATA>
covise::coMultiHash< KEY, DATA >::coMultiHash ( )
inline

Default constructor.

template<class KEY, class DATA>
covise::coMultiHash< KEY, DATA >::coMultiHash ( DATA  nullelem)
inline

Default constructor with NULL element.

template<class KEY, class DATA>
virtual covise::coMultiHash< KEY, DATA >::~coMultiHash ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class KEY, class DATA>
void covise::coMultiHash< KEY, DATA >::clear ( void  )
inline

remove all elements

template<class KEY, class DATA >
INLINE const DATA & covise::coMultiHash< KEY, DATA >::find ( const KEY &  key) const

get element (only use with preset NULL element!!!)

template<class KEY, class DATA>
coHashIter<KEY, DATA> covise::coMultiHash< KEY, DATA >::first ( )
inline

get first to step through

template<class KEY, class DATA >
INLINE unsigned long covise::coMultiHash< KEY, DATA >::getHash ( const KEY &  key) const

get hash index, 0 if no element found

template<class KEY, class DATA>
int covise::coMultiHash< KEY, DATA >::getNumEntries ( ) const
inline

get number of entries currently in hash

template<class KEY, class DATA>
int covise::coMultiHash< KEY, DATA >::insert ( const KEY &  key,
const DATA &  inData 
)
inlinevirtual

insert an entry

Reimplemented from covise::coMultiHashBase< KEY, DATA >.

template<class KEY, class DATA>
coMultiHash& covise::coMultiHash< KEY, DATA >::operator= ( const coMultiHash< KEY, DATA > &  )
inlineprivate

Assignment operator: NOT IMPLEMENTED.

template<class KEY, class DATA>
coHashIter<KEY, DATA> covise::coMultiHash< KEY, DATA >::operator[] ( const KEY &  key)
inline

get element

template<class KEY, class DATA>
int covise::coMultiHash< KEY, DATA >::remove ( const coHashIter< KEY, DATA > &  iter)
inline

remove an entry


The documentation for this class was generated from the following files: