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 //--------------------------------------------------------------------------------------------------370 //--------------------------------------------------------------------------------------------------382 //--------------------------------------------------------------------------------------------------400 //--------------------------------------------------------------------------------------------------412 //--------------------------------------------------------------------------------------------------419 //--------------------------------------------------------------------------------------------------433 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------483 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------500 //--------------------------------------------------------------------------------------------------507 //--------------------------------------------------------------------------------------------------515 //--------------------------------------------------------------------------------------------------523 //--------------------------------------------------------------------------------------------------530 //--------------------------------------------------------------------------------------------------537 //--------------------------------------------------------------------------------------------------545 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------573 //--------------------------------------------------------------------------------------------------580 //--------------------------------------------------------------------------------------------------588 //--------------------------------------------------------------------------------------------------595 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------604 * Iterates over the whole map, calling the supplied callback with each key-value pair. If the callback610 //--------------------------------------------------------------------------------------------------618 //--------------------------------------------------------------------------------------------------631 //--------------------------------------------------------------------------------------------------637 //--------------------------------------------------------------------------------------------------645 //--------------------------------------------------------------------------------------------------651 //--------------------------------------------------------------------------------------------------659 //--------------------------------------------------------------------------------------------------665 //--------------------------------------------------------------------------------------------------675 //--------------------------------------------------------------------------------------------------681 //--------------------------------------------------------------------------------------------------691 //--------------------------------------------------------------------------------------------------697 //--------------------------------------------------------------------------------------------------709 //--------------------------------------------------------------------------------------------------717 //--------------------------------------------------------------------------------------------------730 //--------------------------------------------------------------------------------------------------740 //--------------------------------------------------------------------------------------------------748 //--------------------------------------------------------------------------------------------------755 //--------------------------------------------------------------------------------------------------763 //--------------------------------------------------------------------------------------------------770 //--------------------------------------------------------------------------------------------------778 //--------------------------------------------------------------------------------------------------786 //--------------------------------------------------------------------------------------------------794 //--------------------------------------------------------------------------------------------------801 //--------------------------------------------------------------------------------------------------809 //--------------------------------------------------------------------------------------------------817 //--------------------------------------------------------------------------------------------------819 * Long integer hashing function. This can be used as a paramter to le_hashmap_Create if the key to825 //--------------------------------------------------------------------------------------------------832 //--------------------------------------------------------------------------------------------------834 * Long integer equality function. This can be used as a paramter to le_hashmap_Create if the key to840 //--------------------------------------------------------------------------------------------------848 //--------------------------------------------------------------------------------------------------856 //--------------------------------------------------------------------------------------------------863 //--------------------------------------------------------------------------------------------------871 //--------------------------------------------------------------------------------------------------880 //--------------------------------------------------------------------------------------------------884 //--------------------------------------------------------------------------------------------------912 //--------------------------------------------------------------------------------------------------915 * the trace keyword for this hashmap (the hashmap's name) is enabled for the "framework" component919 //--------------------------------------------------------------------------------------------------926 //--------------------------------------------------------------------------------------------------930 //--------------------------------------------------------------------------------------------------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)