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 //--------------------------------------------------------------------------------------------------420 //--------------------------------------------------------------------------------------------------434 //--------------------------------------------------------------------------------------------------462 //--------------------------------------------------------------------------------------------------468 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------501 //--------------------------------------------------------------------------------------------------508 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------531 //--------------------------------------------------------------------------------------------------538 //--------------------------------------------------------------------------------------------------546 //--------------------------------------------------------------------------------------------------553 //--------------------------------------------------------------------------------------------------560 //--------------------------------------------------------------------------------------------------567 //--------------------------------------------------------------------------------------------------574 //--------------------------------------------------------------------------------------------------581 //--------------------------------------------------------------------------------------------------589 //--------------------------------------------------------------------------------------------------596 //--------------------------------------------------------------------------------------------------603 //--------------------------------------------------------------------------------------------------605 * Iterates over the whole map, calling the supplied callback with each key-value pair. If the callback611 //--------------------------------------------------------------------------------------------------619 //--------------------------------------------------------------------------------------------------632 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------646 //--------------------------------------------------------------------------------------------------652 //--------------------------------------------------------------------------------------------------660 //--------------------------------------------------------------------------------------------------666 //--------------------------------------------------------------------------------------------------676 //--------------------------------------------------------------------------------------------------682 //--------------------------------------------------------------------------------------------------692 //--------------------------------------------------------------------------------------------------698 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------718 //--------------------------------------------------------------------------------------------------731 //--------------------------------------------------------------------------------------------------741 //--------------------------------------------------------------------------------------------------749 //--------------------------------------------------------------------------------------------------756 //--------------------------------------------------------------------------------------------------764 //--------------------------------------------------------------------------------------------------771 //--------------------------------------------------------------------------------------------------779 //--------------------------------------------------------------------------------------------------787 //--------------------------------------------------------------------------------------------------795 //--------------------------------------------------------------------------------------------------802 //--------------------------------------------------------------------------------------------------810 //--------------------------------------------------------------------------------------------------818 //--------------------------------------------------------------------------------------------------820 * Long integer hashing function. This can be used as a paramter to le_hashmap_Create if the key to826 //--------------------------------------------------------------------------------------------------833 //--------------------------------------------------------------------------------------------------835 * Long integer equality function. This can be used as a paramter to le_hashmap_Create if the key to841 //--------------------------------------------------------------------------------------------------849 //--------------------------------------------------------------------------------------------------857 //--------------------------------------------------------------------------------------------------864 //--------------------------------------------------------------------------------------------------872 //--------------------------------------------------------------------------------------------------881 //--------------------------------------------------------------------------------------------------885 //--------------------------------------------------------------------------------------------------913 //--------------------------------------------------------------------------------------------------916 * the trace keyword for this hashmap (the hashmap's name) is enabled for the "framework" component920 //--------------------------------------------------------------------------------------------------927 //--------------------------------------------------------------------------------------------------931 //--------------------------------------------------------------------------------------------------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)