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::coHash< KEY, DATA > Class Template Reference

#include <coHash.h>

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

Public Member Functions

 coHash ()
 Default constructor. More...
 
 coHash (const DATA &nullelem)
 Default constructor with NULL element. More...
 
virtual ~coHash ()
 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

 coHash (const coHash &)
 Copy-Constructor: NOT IMPLEMENTED. More...
 
coHashoperator= (const coHash &)
 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::coHashBase< KEY, DATA >
 coHashBase (DATA nullelem)
 
 coHashBase ()
 
virtual unsigned long nextHash (unsigned long) const
 no identical keys in table 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 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...
 
int getNumEntries () const
 get number of entries currently in hash 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::coHash< KEY, DATA >

Class

Constructor & Destructor Documentation

template<class KEY, class DATA>
covise::coHash< KEY, DATA >::coHash ( const coHash< KEY, DATA > &  )
private

Copy-Constructor: NOT IMPLEMENTED.

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

Default constructor.

template<class KEY, class DATA>
covise::coHash< KEY, DATA >::coHash ( const DATA &  nullelem)
inline

Default constructor with NULL element.

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

Destructor.

Member Function Documentation

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

remove all elements

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

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

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

get first to step through

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

get hash index, 0 if no element found

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

get number of entries currently in hash

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

insert an entry

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

template<class KEY, class DATA>
coHash& covise::coHash< KEY, DATA >::operator= ( const coHash< KEY, DATA > &  )
private

Assignment operator: NOT IMPLEMENTED.

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

get element

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

remove an entry


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