LDK::Hash< const char *, Data, Alloc > Class Template Reference

Inheritance diagram for LDK::Hash< const char *, Data, Alloc >:

Inheritance graph
[legend]
Collaboration diagram for LDK::Hash< const char *, Data, Alloc >:

Collaboration graph
[legend]

Public Types

typedef Iterator iterator
typedef ConstIterator const_iterator

Public Member Functions

 Hash (size_t initialSize=100)
 Hash (const Hash &rhs)
 ~Hash () throw ()
Hashoperator= (const Hash &rhs)
ConstIterator find (const char *key) const
Iterator find (const char *key)
Pair * element (size_t idx)
const Pair * element (size_t idx) const
void set (const char *k, const Data &d)
bool insert (const Pair &p)
bool insert (const char *key, const Data &data)
Iterator erase (const char *key)
Iterator erase (Iterator it)
size_t size () const
size_t allocated () const
Iterator begin ()
ConstIterator begin () const
Iterator end ()
ConstIterator end () const
void clear ()
DataProxy operator[] (const char *k)
const Data & operator[] (const char *k) const

Protected Types

typedef Alloc< Pair > PairAlloc
typedef Alloc< Pair * > PairPtrAlloc

Protected Member Functions

size_t hash (const char *k, size_t allocated) const
void rehash (size_t newAlloc)
void assign (const Hash &rhs)

Static Protected Member Functions

static size_t primeGreaterThan (size_t size)
static size_t newSize (size_t currentSize, size_t freeSlots)

Protected Attributes

PairAlloc mPairAlloc
PairPtrAlloc mPairPtrAlloc
Pair ** mArray
size_t mAllocated
size_t mFreeSlots
size_t mSize

Static Protected Attributes

static const int cIncBy = 7

Data Structures

class  ConstIterator
class  DataProxy
class  Iterator
class  Pair

Detailed Description

template<class Data, template< class > class Alloc>
class LDK::Hash< const char *, Data, Alloc >

Definition at line 46 of file CStringHash.h.


The documentation for this class was generated from the following file:
Generated on Fri Aug 17 18:32:27 2007 for LDK by  doxygen 1.5.1