Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
hashtable< K, T > Struct Template Reference

#include <cube_hash.hpp>

Inheritance diagram for hashtable< K, T >:
hashbase< hashtable< K, T >, hashtableentry< K, T >, K, T >

Public Types

typedef hashbase< hashtable< K,
T >, hashtableentry< K, T >, K,
T > 
basetype
 
typedef basetype::elemtype elemtype
 
enum  
 
enum  
 
typedef K keytype
 
typedef T datatype
 

Public Member Functions

 hashtable (int size=basetype::DEFAULTSIZE)
 
chain * insert (uint h)
 
T & insert (uint h, const U &key)
 
T * access (const U &key)
 
T & access (const U &key, const V &elem)
 
T & operator[] (const U &key)
 
T & find (const U &key, T &notfound)
 
const T & find (const U &key, const T &notfound)
 
bool remove (const U &key)
 
void deletechunks ()
 
void clear ()
 

Static Public Member Functions

static K & getkey (elemtype &elem)
 
static T & getdata (elemtype &elem)
 
template<class U >
static void setkey (elemtype &elem, const U &key)
 
static chain * enumnext (void *i)
 
static K & enumkey (void *i)
 
static T & enumdata (void *i)
 

Public Attributes

int size
 
int numelems
 
chain ** chains
 
chainchunk * chunks
 
chain * unused
 

Member Typedef Documentation

template<class K, class T>
typedef hashbase<hashtable<K, T>, hashtableentry<K, T>, K, T> hashtable< K, T >::basetype
typedef T hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::datatype
inherited
template<class K, class T>
typedef basetype::elemtype hashtable< K, T >::elemtype
typedef K hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::keytype
inherited

Member Enumeration Documentation

anonymous enum
inherited
anonymous enum
inherited

Constructor & Destructor Documentation

template<class K, class T>
hashtable< K, T >::hashtable ( int  size = basetype::DEFAULTSIZE)
inline

Member Function Documentation

T* hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::access ( const U &  key)
inlineinherited
T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::access ( const U &  key,
const V &  elem 
)
inlineinherited
void hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::clear ( )
inlineinherited

Referenced by genmerges().

void hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::deletechunks ( )
inlineinherited
static T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::enumdata ( void i)
inlinestaticinherited
static K& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::enumkey ( void i)
inlinestaticinherited
static chain* hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::enumnext ( void i)
inlinestaticinherited
T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::find ( const U &  key,
T &  notfound 
)
inlineinherited
const T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::find ( const U &  key,
const T &  notfound 
)
inlineinherited
template<class K, class T>
static T& hashtable< K, T >::getdata ( elemtype elem)
inlinestatic
template<class K, class T>
static K& hashtable< K, T >::getkey ( elemtype elem)
inlinestatic
chain* hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::insert ( uint  h)
inlineinherited
T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::insert ( uint  h,
const U &  key 
)
inlineinherited
T& hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::operator[] ( const U &  key)
inlineinherited
bool hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::remove ( const U &  key)
inlineinherited

Referenced by destroyvbo().

template<class K, class T>
template<class U >
static void hashtable< K, T >::setkey ( elemtype elem,
const U &  key 
)
inlinestatic

Member Data Documentation

chain** hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::chains
inherited
chainchunk* hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::chunks
inherited
int hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::numelems
inherited

Referenced by genmerges().

int hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::size
inherited
chain* hashbase< hashtable< K, T > , hashtableentry< K, T > , K, T >::unused
inherited

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