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
hashset< T > Struct Template Reference

#include <cube_hash.hpp>

Inheritance diagram for hashset< T >:
hashbase< hashset< T >, T, T, T >

Public Types

typedef hashbase< hashset< T >
, T, T, T > 
basetype
 
enum  
 
enum  
 
typedef T elemtype
 
typedef T keytype
 
typedef T datatype
 

Public Member Functions

 hashset (int size=basetype::DEFAULTSIZE)
 
template<class V >
T & add (const V &elem)
 
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 const T & getkey (const T &elem)
 
static T & getdata (T &elem)
 
template<class K >
static void setkey (T &elem, const K &key)
 
static chain * enumnext (void *i)
 
static T & 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 T>
typedef hashbase<hashset<T>, T, T, T> hashset< T >::basetype
typedef T hashbase< hashset< T > , T , T , T >::datatype
inherited
typedef T hashbase< hashset< T > , T , T , T >::elemtype
inherited
typedef T hashbase< hashset< T > , T , T , T >::keytype
inherited

Member Enumeration Documentation

anonymous enum
inherited
anonymous enum
inherited

Constructor & Destructor Documentation

template<class T>
hashset< T >::hashset ( int  size = basetype::DEFAULTSIZE)
inline

Member Function Documentation

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

Member Data Documentation

chain** hashbase< hashset< T > , T , T , T >::chains
inherited
chainchunk* hashbase< hashset< T > , T , T , T >::chunks
inherited
int hashbase< hashset< T > , T , T , T >::numelems
inherited
int hashbase< hashset< T > , T , T , T >::size
inherited
chain* hashbase< hashset< T > , T , T , T >::unused
inherited

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