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::coIntMultiHash< DATA > Class Template Reference

#include <coIntMultiHash.h>

Inheritance diagram for covise::coIntMultiHash< DATA >:
Inheritance graph
[legend]
Collaboration diagram for covise::coIntMultiHash< DATA >:
Collaboration graph
[legend]

Public Member Functions

 coIntMultiHash (const DATA &nullelem)
 
 coIntMultiHash ()
 
int getMaxKey () const
 
- Public Member Functions inherited from covise::coMultiHash< int, DATA >
 coMultiHash ()
 Default constructor. More...
 
 coMultiHash (DATA nullelem)
 Default constructor with NULL element. More...
 
virtual ~coMultiHash ()
 Destructor. More...
 
int insert (const int &key, const DATA &inData)
 insert an entry More...
 
int remove (const coHashIter< int, DATA > &iter)
 remove an entry More...
 
coHashIter< int, DATA > operator[] (const int &key)
 get element More...
 
coHashIter< int, 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 int &key) const
 get element (only use with preset NULL element!!!) More...
 
unsigned long getHash (const int &key) const
 get hash index, 0 if no element found More...
 

Private Member Functions

virtual unsigned long hash1 (const int &key) const
 1st Hash function More...
 
virtual unsigned long hash2 (const int &key) const
 2nd Hash function More...
 
virtual bool equal (const int &key1, const int &key2) const
 Equal function. More...
 

Additional Inherited Members

- Protected Types inherited from covise::coMultiHashBase< int, DATA >
enum  
 
- Protected Member Functions inherited from covise::coMultiHashBase< int, 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 int &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...
 
- Protected Attributes inherited from covise::coMultiHashBase< int, DATA >
int * 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 DATA>
class covise::coIntMultiHash< DATA >

Class

Constructor & Destructor Documentation

template<class DATA >
covise::coIntMultiHash< DATA >::coIntMultiHash ( const DATA &  nullelem)
inline
template<class DATA >
covise::coIntMultiHash< DATA >::coIntMultiHash ( )
inline

Member Function Documentation

template<class DATA >
virtual bool covise::coIntMultiHash< DATA >::equal ( const int &  key1,
const int &  key2 
) const
inlineprivatevirtual

Equal function.

Implements covise::coMultiHashBase< int, DATA >.

template<class DATA >
int covise::coIntMultiHash< DATA >::getMaxKey ( ) const
inline
template<class DATA >
virtual unsigned long covise::coIntMultiHash< DATA >::hash1 ( const int &  key) const
inlineprivatevirtual

1st Hash function

Implements covise::coMultiHashBase< int, DATA >.

template<class DATA >
virtual unsigned long covise::coIntMultiHash< DATA >::hash2 ( const int &  key) const
inlineprivatevirtual

2nd Hash function

Implements covise::coMultiHashBase< int, DATA >.


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