Xalan implementation of a hashtable. More...
Classes | |
struct | Entry |
Public Member Functions | |
XalanMap (MemoryManagerType &theMemoryManager, float loadFactor=0.75, size_type minBuckets=eDefaultMinBuckets, size_type eraseThreshold=eDefaultEraseThreshold) | |
XalanMap (const XalanMap &theRhs, MemoryManagerType &theMemoryManager) | |
MemoryManagerType & | getMemoryManager () |
~XalanMap () | |
XalanMap & | operator= (const XalanMap &theRhs) |
size_type | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
data_type & | operator[] (const key_type &key) |
void | insert (const value_type &value) |
void | insert (const key_type &key, const data_type &data) |
void | erase (iterator pos) |
size_type | erase (const key_type &key) |
void | clear () |
void | swap (XalanMap &theRhs) |
Protected Member Functions | |
iterator | doCreateEntry (const key_type &key, const data_type *data=0) |
void | doRemoveEntry (const iterator &toRemovePos) |
void | doRemoveEntries () |
void | doErase (iterator pos) |
size_type | doHash (const Key &key, size_type modulus) const |
size_type | doHash (const Key &key) const |
void | rehash () |
value_type * | allocate (size_type size) |
void | deallocate (value_type *pointer) |
void | compactBuckets () |
Static Protected Member Functions | |
static size_type | calculateNewBucketCapacity (size_type theCurrentSize, size_type theExtraCapacity) |
Protected Attributes | |
KeyTraits::Hasher | m_hash |
KeyTraits::Comparator | m_equals |
MemoryManagerType * | m_memoryManager |
float | m_loadFactor |
const size_type | m_minBuckets |
size_type | m_size |
EntryListType | m_entries |
EntryListType | m_freeEntries |
BucketTableType | m_buckets |
size_type | m_eraseCount |
size_type | m_eraseThreshold |
Xalan implementation of a hashtable.
typedef BucketType::iterator XalanMap< Key, Value, KeyTraits >::BucketIterator |
typedef XalanVector<BucketType, ConstructWithMemoryManagerTraits<BucketType> > XalanMap< Key, Value, KeyTraits >::BucketTableType |
typedef XalanVector<typename EntryListType::iterator> XalanMap< Key, Value, KeyTraits >::BucketType |
typedef XalanMapIterator< XalanMapConstIteratorTraits<value_type>, typename EntryListType::iterator> XalanMap< Key, Value, KeyTraits >::const_iterator |
typedef Value XalanMap< Key, Value, KeyTraits >::data_type |
typedef EntryListType::iterator XalanMap< Key, Value, KeyTraits >::EntryListIterator |
typedef XalanList<Entry> XalanMap< Key, Value, KeyTraits >::EntryListType |
typedef MemoryManagedConstructionTraits<key_type>::Constructor XalanMap< Key, Value, KeyTraits >::FirstConstructor |
typedef XalanMapIterator< XalanMapIteratorTraits<value_type>, typename EntryListType::iterator> XalanMap< Key, Value, KeyTraits >::iterator |
typedef Key XalanMap< Key, Value, KeyTraits >::key_type |
Each map entry is stored in a linked list where an entry consists of a pointer to the key/value pair and a flag to indicate whether the entry has been erased.
The hash buckets are a vector of pointers into the entry list. Deleted entries are spliced into another list and marked 'erased'.
typedef MemoryManagedConstructionTraits<data_type>::Constructor XalanMap< Key, Value, KeyTraits >::SecondConstructor |
typedef size_t XalanMap< Key, Value, KeyTraits >::size_type |
typedef BucketTableType::iterator XalanMap< Key, Value, KeyTraits >::TableIterator |
typedef XALAN_STD_QUALIFIER pair<const key_type, data_type> XalanMap< Key, Value, KeyTraits >::value_type |
anonymous enum |
XalanMap< Key, Value, KeyTraits >::XalanMap | ( | MemoryManagerType & | theMemoryManager, |
float | loadFactor = 0.75 , |
||
size_type | minBuckets = eDefaultMinBuckets , |
||
size_type | eraseThreshold = eDefaultEraseThreshold |
||
) |
XalanMap< Key, Value, KeyTraits >::XalanMap | ( | const XalanMap< Key, Value, KeyTraits > & | theRhs, |
MemoryManagerType & | theMemoryManager | ||
) |
XalanMap< Key, Value, KeyTraits >::~XalanMap | ( | ) |
|
protected |
iterator XalanMap< Key, Value, KeyTraits >::begin | ( | ) |
const_iterator XalanMap< Key, Value, KeyTraits >::begin | ( | ) | const |
|
staticprotected |
void XalanMap< Key, Value, KeyTraits >::clear | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool XalanMap< Key, Value, KeyTraits >::empty | ( | ) | const |
iterator XalanMap< Key, Value, KeyTraits >::end | ( | ) |
const_iterator XalanMap< Key, Value, KeyTraits >::end | ( | ) | const |
void XalanMap< Key, Value, KeyTraits >::erase | ( | iterator | pos) |
size_type XalanMap< Key, Value, KeyTraits >::erase | ( | const key_type & | key) |
iterator XalanMap< Key, Value, KeyTraits >::find | ( | const key_type & | key) |
const_iterator XalanMap< Key, Value, KeyTraits >::find | ( | const key_type & | key) | const |
MemoryManagerType& XalanMap< Key, Value, KeyTraits >::getMemoryManager | ( | ) |
void XalanMap< Key, Value, KeyTraits >::insert | ( | const value_type & | value) |
void XalanMap< Key, Value, KeyTraits >::insert | ( | const key_type & | key, |
const data_type & | data | ||
) |
XalanMap& XalanMap< Key, Value, KeyTraits >::operator= | ( | const XalanMap< Key, Value, KeyTraits > & | theRhs) |
data_type& XalanMap< Key, Value, KeyTraits >::operator[] | ( | const key_type & | key) |
|
protected |
size_type XalanMap< Key, Value, KeyTraits >::size | ( | ) | const |
void XalanMap< Key, Value, KeyTraits >::swap | ( | XalanMap< Key, Value, KeyTraits > & | theRhs) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.10 |
|