doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
idHashTable< Type > Class Template Reference

#include <HashTable.h>

Classes

struct  hashnode_s
 

Public Member Functions

 idHashTable (int newtablesize=256)
 
 idHashTable (const idHashTable< Type > &map)
 
 ~idHashTable (void)
 
size_t Allocated (void) const
 
size_t Size (void) const
 
void Set (const char *key, Type &value)
 
bool Get (const char *key, Type **value=NULL) const
 
bool Remove (const char *key)
 
void Clear (void)
 
void DeleteContents (void)
 
int Num (void) const
 
Type * GetIndex (int index) const
 
int GetSpread (void) const
 

Private Member Functions

int GetHash (const char *key) const
 

Private Attributes

hashnode_s ** heads
 
int tablesize
 
int numentries
 
int tablesizemask
 

Detailed Description

template<class Type>
class idHashTable< Type >

Definition at line 42 of file HashTable.h.

Constructor & Destructor Documentation

template<class Type >
ID_INLINE idHashTable< Type >::idHashTable ( int  newtablesize = 256)

Definition at line 92 of file HashTable.h.

template<class Type>
ID_INLINE idHashTable< Type >::idHashTable ( const idHashTable< Type > &  map)

Definition at line 113 of file HashTable.h.

template<class Type >
ID_INLINE idHashTable< Type >::~idHashTable ( void  )

Definition at line 145 of file HashTable.h.

Member Function Documentation

template<class Type >
ID_INLINE size_t idHashTable< Type >::Allocated ( void  ) const

Definition at line 156 of file HashTable.h.

template<class Type >
ID_INLINE void idHashTable< Type >::Clear ( void  )

Definition at line 310 of file HashTable.h.

template<class Type >
ID_INLINE void idHashTable< Type >::DeleteContents ( void  )

Definition at line 335 of file HashTable.h.

template<class Type>
ID_INLINE bool idHashTable< Type >::Get ( const char *  key,
Type **  value = NULL 
) const

Definition at line 214 of file HashTable.h.

template<class Type >
ID_INLINE int idHashTable< Type >::GetHash ( const char *  key) const
private

Definition at line 176 of file HashTable.h.

template<class Type >
ID_INLINE Type * idHashTable< Type >::GetIndex ( int  index) const

Definition at line 248 of file HashTable.h.

template<class Type >
int idHashTable< Type >::GetSpread ( void  ) const

Definition at line 376 of file HashTable.h.

template<class Type >
ID_INLINE int idHashTable< Type >::Num ( void  ) const

Definition at line 361 of file HashTable.h.

template<class Type >
ID_INLINE bool idHashTable< Type >::Remove ( const char *  key)

Definition at line 277 of file HashTable.h.

template<class Type>
ID_INLINE void idHashTable< Type >::Set ( const char *  key,
Type &  value 
)

Definition at line 186 of file HashTable.h.

template<class Type >
ID_INLINE size_t idHashTable< Type >::Size ( void  ) const

Definition at line 166 of file HashTable.h.

Member Data Documentation

template<class Type>
hashnode_s** idHashTable< Type >::heads
private

Definition at line 77 of file HashTable.h.

template<class Type>
int idHashTable< Type >::numentries
private

Definition at line 80 of file HashTable.h.

template<class Type>
int idHashTable< Type >::tablesize
private

Definition at line 79 of file HashTable.h.

template<class Type>
int idHashTable< Type >::tablesizemask
private

Definition at line 81 of file HashTable.h.


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