le_hashmap.h
Go to the documentation of this file.
164 //--------------------------------------------------------------------------------------------------172 //--------------------------------------------------------------------------------------------------185 //--------------------------------------------------------------------------------------------------189 //--------------------------------------------------------------------------------------------------192 //--------------------------------------------------------------------------------------------------196 //--------------------------------------------------------------------------------------------------199 //--------------------------------------------------------------------------------------------------207 //--------------------------------------------------------------------------------------------------209 (213 //--------------------------------------------------------------------------------------------------223 //--------------------------------------------------------------------------------------------------225 (231 //--------------------------------------------------------------------------------------------------233 * Prototype for callback functions for the iterator function le_hashmap_ForEach(). This function should241 //--------------------------------------------------------------------------------------------------243 (301 //--------------------------------------------------------------------------------------------------317 //--------------------------------------------------------------------------------------------------327 //--------------------------------------------------------------------------------------------------331 //--------------------------------------------------------------------------------------------------339 //--------------------------------------------------------------------------------------------------355 //--------------------------------------------------------------------------------------------------371 //--------------------------------------------------------------------------------------------------383 //--------------------------------------------------------------------------------------------------401 //--------------------------------------------------------------------------------------------------413 //--------------------------------------------------------------------------------------------------419 //--------------------------------------------------------------------------------------------------431 //--------------------------------------------------------------------------------------------------439 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------481 //--------------------------------------------------------------------------------------------------487 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------511 //--------------------------------------------------------------------------------------------------520 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------535 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------557 //--------------------------------------------------------------------------------------------------565 //--------------------------------------------------------------------------------------------------572 //--------------------------------------------------------------------------------------------------579 //--------------------------------------------------------------------------------------------------586 //--------------------------------------------------------------------------------------------------593 //--------------------------------------------------------------------------------------------------600 //--------------------------------------------------------------------------------------------------608 //--------------------------------------------------------------------------------------------------615 //--------------------------------------------------------------------------------------------------622 //--------------------------------------------------------------------------------------------------624 * Iterates over the whole map, calling the supplied callback with each key-value pair. If the callback630 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------651 //--------------------------------------------------------------------------------------------------657 //--------------------------------------------------------------------------------------------------665 //--------------------------------------------------------------------------------------------------671 //--------------------------------------------------------------------------------------------------679 //--------------------------------------------------------------------------------------------------685 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------701 //--------------------------------------------------------------------------------------------------711 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------729 //--------------------------------------------------------------------------------------------------737 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------760 //--------------------------------------------------------------------------------------------------768 //--------------------------------------------------------------------------------------------------775 //--------------------------------------------------------------------------------------------------783 //--------------------------------------------------------------------------------------------------790 //--------------------------------------------------------------------------------------------------798 //--------------------------------------------------------------------------------------------------806 //--------------------------------------------------------------------------------------------------814 //--------------------------------------------------------------------------------------------------821 //--------------------------------------------------------------------------------------------------829 //--------------------------------------------------------------------------------------------------837 //--------------------------------------------------------------------------------------------------839 * Long integer hashing function. This can be used as a paramter to le_hashmap_Create if the key to845 //--------------------------------------------------------------------------------------------------852 //--------------------------------------------------------------------------------------------------854 * Long integer equality function. This can be used as a paramter to le_hashmap_Create if the key to860 //--------------------------------------------------------------------------------------------------868 //--------------------------------------------------------------------------------------------------876 //--------------------------------------------------------------------------------------------------883 //--------------------------------------------------------------------------------------------------891 //--------------------------------------------------------------------------------------------------900 //--------------------------------------------------------------------------------------------------904 //--------------------------------------------------------------------------------------------------932 //--------------------------------------------------------------------------------------------------935 * the trace keyword for this hashmap (the hashmap's name) is enabled for the "framework" component939 //--------------------------------------------------------------------------------------------------946 //--------------------------------------------------------------------------------------------------950 //--------------------------------------------------------------------------------------------------const void * le_hashmap_GetKey(le_hashmap_It_Ref_t iteratorRef)Definition: le_hashmap.h:280Definition: le_hashmap.h:268void 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:294le_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:287size_t(* le_hashmap_HashFunc_t)(const void *keyToHashPtr)Definition: le_hashmap.h:209le_hashmap_HashFunc_t hashFuncPtrHash operator.Definition: le_hashmap.h:285le_hashmap_HashmapIt_t iteratorIterator instance.Definition: le_hashmap.h:282size_t le_hashmap_Size(le_hashmap_Ref_t mapRef)bool le_hashmap_EqualsString(const void *firstStringPtr, const void *secondStringPtr)Definition: le_hashmap.h:255size_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:271bool 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:288void * le_hashmap_GetValue(le_hashmap_It_Ref_t iteratorRef)bool(* le_hashmap_EqualsFunc_t)(const void *firstKeyPtr, const void *secondKeyPtr)Definition: le_hashmap.h:225le_hashmap_Link_t entryListLinkNext entry in bucket.Definition: le_hashmap.h:257bool(* le_hashmap_ForEachHandler_t)(const void *keyPtr, const void *valuePtr, void *contextPtr)Definition: le_hashmap.h:243size_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:259void * le_hashmap_Remove(le_hashmap_Ref_t mapRef, const void *keyPtr)le_hashmap_EqualsFunc_t equalsFuncPtrEquality operator.Definition: le_hashmap.h:284bool le_hashmap_ContainsKey(le_hashmap_Ref_t mapRef, const void *keyPtr)Definition: le_singlyLinkedList.h:201le_hashmap_Ref_t le_hashmap_Create(const char *nameStr, size_t capacity, le_hashmap_HashFunc_t hashFunc, le_hashmap_EqualsFunc_t equalsFunc)void 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:293void * 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:270le_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)