le_hashmap.h
Go to the documentation of this file.
164 //--------------------------------------------------------------------------------------------------172 //--------------------------------------------------------------------------------------------------190 //--------------------------------------------------------------------------------------------------194 //--------------------------------------------------------------------------------------------------197 //--------------------------------------------------------------------------------------------------201 //--------------------------------------------------------------------------------------------------204 //--------------------------------------------------------------------------------------------------212 //--------------------------------------------------------------------------------------------------214 (218 //--------------------------------------------------------------------------------------------------228 //--------------------------------------------------------------------------------------------------230 (236 //--------------------------------------------------------------------------------------------------238 * Prototype for callback functions for the iterator function le_hashmap_ForEach(). This function should246 //--------------------------------------------------------------------------------------------------248 (306 //--------------------------------------------------------------------------------------------------322 //--------------------------------------------------------------------------------------------------332 //--------------------------------------------------------------------------------------------------336 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------360 //--------------------------------------------------------------------------------------------------362 (376 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------406 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------424 //--------------------------------------------------------------------------------------------------436 //--------------------------------------------------------------------------------------------------444 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------486 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------508 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------525 //--------------------------------------------------------------------------------------------------532 //--------------------------------------------------------------------------------------------------540 //--------------------------------------------------------------------------------------------------548 //--------------------------------------------------------------------------------------------------555 //--------------------------------------------------------------------------------------------------562 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------577 //--------------------------------------------------------------------------------------------------584 //--------------------------------------------------------------------------------------------------591 //--------------------------------------------------------------------------------------------------598 //--------------------------------------------------------------------------------------------------605 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------620 //--------------------------------------------------------------------------------------------------627 //--------------------------------------------------------------------------------------------------629 * Iterates over the whole map, calling the supplied callback with each key-value pair. If the callback635 //--------------------------------------------------------------------------------------------------643 //--------------------------------------------------------------------------------------------------656 //--------------------------------------------------------------------------------------------------662 //--------------------------------------------------------------------------------------------------670 //--------------------------------------------------------------------------------------------------676 //--------------------------------------------------------------------------------------------------684 //--------------------------------------------------------------------------------------------------690 //--------------------------------------------------------------------------------------------------700 //--------------------------------------------------------------------------------------------------706 //--------------------------------------------------------------------------------------------------716 //--------------------------------------------------------------------------------------------------722 //--------------------------------------------------------------------------------------------------734 //--------------------------------------------------------------------------------------------------742 //--------------------------------------------------------------------------------------------------755 //--------------------------------------------------------------------------------------------------765 //--------------------------------------------------------------------------------------------------773 //--------------------------------------------------------------------------------------------------780 //--------------------------------------------------------------------------------------------------788 //--------------------------------------------------------------------------------------------------795 //--------------------------------------------------------------------------------------------------803 //--------------------------------------------------------------------------------------------------811 //--------------------------------------------------------------------------------------------------819 //--------------------------------------------------------------------------------------------------826 //--------------------------------------------------------------------------------------------------834 //--------------------------------------------------------------------------------------------------842 //--------------------------------------------------------------------------------------------------844 * Long integer hashing function. This can be used as a paramter to le_hashmap_Create if the key to850 //--------------------------------------------------------------------------------------------------857 //--------------------------------------------------------------------------------------------------859 * Long integer equality function. This can be used as a paramter to le_hashmap_Create if the key to865 //--------------------------------------------------------------------------------------------------873 //--------------------------------------------------------------------------------------------------881 //--------------------------------------------------------------------------------------------------888 //--------------------------------------------------------------------------------------------------896 //--------------------------------------------------------------------------------------------------905 //--------------------------------------------------------------------------------------------------909 //--------------------------------------------------------------------------------------------------937 //--------------------------------------------------------------------------------------------------940 * the trace keyword for this hashmap (the hashmap's name) is enabled for the "framework" component944 //--------------------------------------------------------------------------------------------------951 //--------------------------------------------------------------------------------------------------955 //--------------------------------------------------------------------------------------------------const void * le_hashmap_GetKey(le_hashmap_It_Ref_t iteratorRef)Definition: le_hashmap.h:285Definition: le_hashmap.h:273void le_hashmap_EnableTrace(le_hashmap_Ref_t mapRef)Definition: le_singlyLinkedList.h:186bool le_hashmap_ForEach(le_hashmap_Ref_t mapRef, le_hashmap_ForEachHandler_t forEachFn, void *contextPtr)void * le_hashmap_GetStoredKey(le_hashmap_Ref_t mapRef, const void *keyPtr)le_log_TraceRef_t traceRefLog trace reference for debugging the hashmap.Definition: le_hashmap.h:299le_hashmap_It_Ref_t le_hashmap_GetIterator(le_hashmap_Ref_t mapRef)le_hashmap_Bucket_t * bucketsPtrPointer to the array of hash map buckets.Definition: le_hashmap.h:292size_t(* le_hashmap_HashFunc_t)(const void *keyToHashPtr)Definition: le_hashmap.h:214le_hashmap_HashFunc_t hashFuncPtrHash operator.Definition: le_hashmap.h:290le_hashmap_HashmapIt_t iteratorIterator instance.Definition: le_hashmap.h:287size_t le_hashmap_Size(le_hashmap_Ref_t mapRef)bool le_hashmap_EqualsString(const void *firstStringPtr, const void *secondStringPtr)Definition: le_hashmap.h:260size_t le_hashmap_HashUInt32(const void *intToHashPtr)size_t le_hashmap_HashString(const void *stringToHashPtr)le_hashmap_Link_t * currentLinkPtrCurrent bucket list item pointer.Definition: le_hashmap.h:276le_hashmap_Ref_t le_hashmap_Create(const char *nameStr, size_t capacity, le_hashmap_HashFunc_t hashFunc, le_hashmap_EqualsFunc_t equalsFunc)*/Definition: le_hashmap.h:362bool le_hashmap_isEmpty(le_hashmap_Ref_t mapRef)bool le_hashmap_EqualsVoidPointer(const void *firstVoidPtr, const void *secondVoidPtr)void * le_hashmap_Put(le_hashmap_Ref_t mapRef, const void *keyPtr, const void *valuePtr)*/le_mem_PoolRef_t entryPoolRefMemory pool to expand into for expanding buckets.Definition: le_hashmap.h:293void * le_hashmap_GetValue(le_hashmap_It_Ref_t iteratorRef)bool(* le_hashmap_EqualsFunc_t)(const void *firstKeyPtr, const void *secondKeyPtr)Definition: le_hashmap.h:230le_hashmap_Link_t entryListLinkNext entry in bucket.Definition: le_hashmap.h:262bool(* le_hashmap_ForEachHandler_t)(const void *keyPtr, const void *valuePtr, void *contextPtr)Definition: le_hashmap.h:248size_t le_hashmap_CountCollisions(le_hashmap_Ref_t mapRef)le_result_t le_hashmap_GetFirstNode(le_hashmap_Ref_t mapRef, void **firstKeyPtr, void **firstValuePtr)size_t le_hashmap_HashVoidPointer(const void *voidToHashPtr)void le_hashmap_MakeTraceable(le_hashmap_Ref_t mapRef)const void * valuePtrPointer to value data.Definition: le_hashmap.h:264void * le_hashmap_Remove(le_hashmap_Ref_t mapRef, const void *keyPtr)le_hashmap_EqualsFunc_t equalsFuncPtrEquality operator.Definition: le_hashmap.h:289bool le_hashmap_ContainsKey(le_hashmap_Ref_t mapRef, const void *keyPtr)Definition: le_singlyLinkedList.h:201void le_hashmap_RemoveAll(le_hashmap_Ref_t mapRef)bool le_hashmap_EqualsUInt64(const void *firstIntPtr, const void *secondIntPtr)const char * nameStrName of the hashmap for diagnostic purposes.Definition: le_hashmap.h:298void * le_hashmap_Get(le_hashmap_Ref_t mapRef, const void *keyPtr)Definition: le_doublyLinkedList.h:200le_result_t le_hashmap_NextNode(le_hashmap_It_Ref_t iteratorRef)Definition: le_doublyLinkedList.h:216bool le_hashmap_EqualsUInt32(const void *firstIntPtr, const void *secondIntPtr)size_t le_hashmap_HashUInt64(const void *intToHashPtr)size_t currentIndexCurrent bucket index.Definition: le_hashmap.h:275le_result_t le_hashmap_PrevNode(le_hashmap_It_Ref_t iteratorRef)le_result_t le_hashmap_GetNodeAfter(le_hashmap_Ref_t mapRef, const void *keyPtr, void **nextKeyPtr, void **nextValuePtr)