hashtable< K, T > Struct Template Reference

#include <tools.h>

Collaboration diagram for hashtable< K, T >:

Collaboration graph
[legend]

List of all members.

Classes

struct  chain
struct  chainchunk

Public Types

enum  { CHUNKSIZE = 16 }
typedef K key
typedef const K const_key
typedef T value
typedef const T const_value

Public Member Functions

 hashtable (int size=1<< 10)
 ~hashtable ()
chain * insert (const K &key, uint h)
T * access (const K &key)
T & access (const K &key, const T &data)
T & operator[] (const K &key)
bool remove (const K &key)
void deletechunks ()
void clear ()

Public Attributes

int size
int numelems
chain ** table
chain * enumc
chainchunk * chunks
chain * unused

template<class K, class T>
struct hashtable< K, T >


Member Typedef Documentation

template<class K , class T >
typedef const K hashtable< K, T >::const_key

template<class K , class T >
typedef const T hashtable< K, T >::const_value

template<class K , class T >
typedef K hashtable< K, T >::key

template<class K , class T >
typedef T hashtable< K, T >::value


Member Enumeration Documentation

template<class K , class T >
anonymous enum

Enumerator:
CHUNKSIZE 


Constructor & Destructor Documentation

template<class K , class T >
hashtable< K, T >::hashtable (  )  [inline]

template<class K , class T >
hashtable< K, T >::~hashtable (  )  [inline]


Member Function Documentation

template<class K , class T >
T& hashtable< K, T >::access ( const K &  key,
const T &  data 
) [inline]

template<class K , class T >
T* hashtable< K, T >::access ( const K &  key  )  [inline]

template<class K , class T >
void hashtable< K, T >::clear (  )  [inline]

template<class K , class T >
void hashtable< K, T >::deletechunks (  )  [inline]

template<class K , class T >
chain* hashtable< K, T >::insert ( const K &  key,
uint  h 
) [inline]

template<class K , class T >
T& hashtable< K, T >::operator[] ( const K &  key  )  [inline]

template<class K , class T >
bool hashtable< K, T >::remove ( const K &  key  )  [inline]


Member Data Documentation

template<class K , class T >
chainchunk* hashtable< K, T >::chunks

template<class K , class T >
chain* hashtable< K, T >::enumc

template<class K , class T >
int hashtable< K, T >::numelems

template<class K , class T >
int hashtable< K, T >::size

template<class K , class T >
chain** hashtable< K, T >::table

template<class K , class T >
chain* hashtable< K, T >::unused


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

Generated on Mon Dec 8 21:41:35 2008 for AssaultCube by  doxygen 1.5.7.1