|
template<typename ElementKeyType2 > |
int | _findOrAdd (const ElementKeyType2 &key, ElementType **addedElement, int *elemExists, bool cleanElem) |
|
int | addReplace (ElementType *elem, ElementType **addedElement=NULL, int *elemExists=NULL) |
|
template<typename ElementKeyType2 > |
int | addReplace_CleanElem (const ElementKeyType2 &key, ElementType **addedElement, int *elemExists) |
|
int | allocSize () |
|
template<typename ElementKeyType2 > |
int | append (const ElementKeyType2 &key, ElementType **addedElement, bool bCleanElem) |
|
void | clear () |
|
void | createElem (ElementType *elem) |
|
void | destroyElem (ElementType *elem) |
|
int | EQ_COMPARATOR (ElementType *e1, ElementType *e2) |
|
template<typename ElementKeyType2 > |
int | findOrAdd (const ElementKeyType2 &key, ElementType **addedElement, int *elemExists) |
|
template<typename ElementKeyType2 > |
int | findOrAdd_CleanElem (const ElementKeyType2 &key, ElementType **addedElement=NULL, int *elemExists=NULL) |
|
hashvalue_t | hash_function (ElementType *e) |
|
template<typename ElementKeyType2 > |
hashvalue_t | hash_function_key (const ElementKeyType2 &key) |
|
| HashTable () |
|
void | init (const char *aname, int num_elements, void *allocatedMemory) |
|
template<class Allocator > |
void | init (const char *aname, int num_elements, Allocator &allocator) |
|
void | init (const char *aname, int num_elements) |
|
ElementType * | init_iterator (iterator &it) |
|
bool | isFull () |
|
bool | isMember (ElementType *elem) |
|
template<typename ElementKeyType2 > |
int | Key_EQ_COMPARATOR (ElementType *e1, const ElementKeyType2 &key2) |
|
template<typename ElementKeyType2 > |
ElementType * | lookupByHashedKey (const ElementKeyType2 &key, hashvalue_t hash) |
|
template<typename ElementKeyType2 > |
ElementType * | lookupByKey (const ElementKeyType2 &key) |
|
int | maxElements () |
|
int | minAllowedElements (int num_elements) |
|
int | numElements () |
|
void * | release () |
|
void | remove (ElementType *element) |
|
template<typename ElementKeyType2 > |
bool | removeByKey (const ElementKeyType2 &key) |
|
void | swap (HashTable &rhs) |
|
| ~HashTable () |
|
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::~HashTable |
( |
| ) |
|
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::clear(), FREE, HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::lock, and SPINLOCK_FINI.
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::_findOrAdd |
( |
const ElementKeyType2 & |
key, |
|
|
ElementType ** |
addedElement, |
|
|
int * |
elemExists, |
|
|
bool |
cleanElem |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::append().
Referenced by HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::findOrAdd(), and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::findOrAdd_CleanElem().
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::addReplace |
( |
ElementType * |
elem, |
|
|
ElementType ** |
addedElement = NULL , |
|
|
int * |
elemExists = NULL |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::copyElem(), HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::findOrAdd(), and unlikely().
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::addReplace_CleanElem |
( |
const ElementKeyType2 & |
key, |
|
|
ElementType ** |
addedElement, |
|
|
int * |
elemExists |
|
) |
| |
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::allocSize |
( |
| ) |
|
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::append |
( |
const ElementKeyType2 & |
key, |
|
|
ElementType ** |
addedElement, |
|
|
bool |
bCleanElem |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::cleanElem(), HASHTABLE_ENTRIES, IDX_TO_ELEM, and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::numElements().
Referenced by HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::_findOrAdd().
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
static void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::cleanElem |
( |
ElementType * |
elem | ) |
|
|
inlinestatic |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::clear |
( |
| ) |
|
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::init_iterator(), and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::iterator::next().
Referenced by HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::~HashTable().
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::findOrAdd |
( |
const ElementKeyType2 & |
key, |
|
|
ElementType ** |
addedElement, |
|
|
int * |
elemExists |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::_findOrAdd().
Referenced by HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::addReplace(), and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::addReplace_CleanElem().
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::findOrAdd_CleanElem |
( |
const ElementKeyType2 & |
key, |
|
|
ElementType ** |
addedElement = NULL , |
|
|
int * |
elemExists = NULL |
|
) |
| |
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::init |
( |
const char * |
aname, |
|
|
int |
num_elements, |
|
|
void * |
allocatedMemory |
|
) |
| |
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<class Allocator >
void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::init |
( |
const char * |
aname, |
|
|
int |
num_elements, |
|
|
Allocator & |
allocator |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::allocSize(), HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::minAllowedElements(), and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::name.
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::init |
( |
const char * |
aname, |
|
|
int |
num_elements |
|
) |
| |
|
inline |
References HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::allocSize(), MALLOC, HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::minAllowedElements(), and HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::name.
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
ElementType* HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::init_iterator |
( |
iterator & |
it | ) |
|
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
int HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::Key_EQ_COMPARATOR |
( |
ElementType * |
e1, |
|
|
const ElementKeyType2 & |
key2 |
|
) |
| |
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
template<typename ElementKeyType2 >
ElementType* HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::lookupByKey |
( |
const ElementKeyType2 & |
key | ) |
|
|
inline |
template<typename ElementType , typename ElementKeyType , typename ElementKeyHashFunction = HashCalc<ElementKeyType>, typename ElementEQComparator = HashEQComparator<ElementKeyType>, typename ElementKeyCopier = KeyCopier<ElementKeyType>>
void HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier >::swap |
( |
HashTable< ElementType, ElementKeyType, ElementKeyHashFunction, ElementEQComparator, ElementKeyCopier > & |
rhs | ) |
|
|
inline |