Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
CHashTable< Etype, HashFunctions > Class Template Reference

CHashTable is a template class that implements an hash table. More...

Detailed Description

template<class Etype, typename HashFunctions = CHashMethods<Etype>>
class CHashTable< Etype, HashFunctions >

CHashTable is a template class that implements an hash table.

CHashMethods must be provided to compare entries and generate hash value for the template EType

#include <Hash.h>

Public Types

enum  KindOfEntry { Active , Empty , Deleted }
 

Public Member Functions

 CHashTable (unsigned int defaultSize=DefaultHashSize)
 
 CHashTable (const CHashTable &Rhs)
 
const CHashTableoperator= (const CHashTable &Rhs)
 
unsigned int CopyTo (CXArray< Etype > &dstArray) const
 
unsigned int InitFrom (const CXArray< Etype > &dstArray, bool clear=true)
 
void InitHashTable (unsigned int elementsNumber)
 
unsigned int GetHashTableSize () const
 
bool Minimize ()
 
bool Compare (const CHashTable &Rhs) const
 
void Merge (const CHashTable &Rhs)
 
void Remove (const CHashTable &Rhs)
 
int Insert (const Etype &X)
 
void InsertAndReplace (const Etype &X)
 
int Remove (const Etype &X, bool enableResize=false)
 
int FindAndUpdate (Etype &X)
 
int IsFound (const Etype &X) const
 
int IsEmpty () const
 
void Free ()
 
void Clear ()
 
unsigned int GetCount () const
 
HashPos GetFirst () const
 
void GetNext (HashPos &pos, Etype &element) const
 
EtypeGetNext (HashPos &pos) const
 
EtypeGetNextPtr (HashPos &pos) const
 

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