Defines | Typedefs | Functions

# hashmap.h File Reference

Go to the source code of this file.

## Defines

#define | SmallHashmapSize 17
#define | MediumHashmapSize 509
#define | LargeHashmapSize 8191
#define | HugeHashmapSize 131071

## Typedefs

typedef struct _HashmapInfo | HashmapInfo
typedef struct _LinkedListInfo | LinkedListInfo

## Functions

WizardExport HashmapInfo * | DestroyHashmap (HashmapInfo *)
WizardExport HashmapInfo ** | NewHashmap (const size_t, size_t(*)(const void *), WizardBooleanType(*)(const void *, const void *), void *(*)(void *), void *(*)(void *))
WizardExport LinkedListInfo * | DestroyLinkedList (LinkedListInfo *, void *(*)(void *))
WizardExport LinkedListInfo ** | NewLinkedList (const size_t)
WizardExport WizardBooleanType | AppendValueToLinkedList (LinkedListInfo *, const void *)
WizardExport WizardBooleanType | CompareHashmapString (const void *, const void *)
WizardExport WizardBooleanType | CompareHashmapStringInfo (const void *, const void *)
WizardExport WizardBooleanType | InsertValueInLinkedList (LinkedListInfo *, const size_t, const void *)
WizardExport WizardBooleanType | InsertValueInSortedLinkedList (LinkedListInfo *, int(*)(const void *, const void *), void **, const void *)
WizardExport WizardBooleanType | IsHashmapEmpty (const HashmapInfo *)
WizardExport WizardBooleanType | IsLinkedListEmpty (const LinkedListInfo *)
WizardExport WizardBooleanType | LinkedListToArray (LinkedListInfo *, void **)
WizardExport WizardBooleanType | PutEntryInHashmap (HashmapInfo *, const void *, const void *)
WizardExport size_t | HashPointerType (const void *)
WizardExport size_t | HashStringType (const void *)
WizardExport size_t | HashStringInfoType (const void *)
WizardExport size_t | GetNumberOfElementsInLinkedList (const LinkedListInfo *)
WizardExport size_t | GetNumberOfEntriesInHashmap (const HashmapInfo *)
WizardExport void | ClearLinkedList (LinkedListInfo *, void *(*)(void *))
WizardExport void * | GetLastValueInLinkedList (LinkedListInfo *)
WizardExport void ** | GetNextKeyInHashmap (HashmapInfo *)
WizardExport void *** | GetNextValueInHashmap (HashmapInfo *)
WizardExport void **** | GetNextValueInLinkedList (LinkedListInfo *)
WizardExport void ***** | GetValueFromHashmap (HashmapInfo *, const void *)
WizardExport void ****** | GetValueFromLinkedList (LinkedListInfo *, const size_t)
WizardExport void ******* | RemoveElementByValueFromLinkedList (LinkedListInfo *, const void *)
WizardExport void ******** | RemoveElementFromLinkedList (LinkedListInfo *, const size_t)
WizardExport void ********* | RemoveEntryFromHashmap (HashmapInfo *, const void *)
WizardExport void ********** | RemoveLastElementFromLinkedList (LinkedListInfo *)
WizardExport void ********** | ResetHashmapIterator (HashmapInfo *)
WizardExport void ********** | ResetLinkedListIterator (LinkedListInfo *)

## Define Documentation

#define HugeHashmapSize 131071

#define LargeHashmapSize 8191

#define MediumHashmapSize 509

#define SmallHashmapSize 17

## Typedef Documentation

typedef struct _HashmapInfo HashmapInfo

typedef struct _LinkedListInfo LinkedListInfo

## Function Documentation

WizardExport WizardBooleanType AppendValueToLinkedList | ( | LinkedListInfo * | ,
|  | const void * |  |
| ) |  |  |

WizardExport void ClearLinkedList | ( | LinkedListInfo * | ,
|  | void * | *)(void * |
| ) |  |  |

WizardExport WizardBooleanType CompareHashmapString | ( | const void * | ,
|  | const void * |  |
| ) |  |  |

WizardExport WizardBooleanType CompareHashmapStringInfo | ( | const void * | ,
|  | const void * |  |
| ) |  |  |

WizardExport HashmapInfo* DestroyHashmap | ( | HashmapInfo * |  | ) |

WizardExport LinkedListInfo* DestroyLinkedList | ( | LinkedListInfo * | ,
|  | void * | *)(void * |
| ) |  |  |

WizardExport void * GetLastValueInLinkedList | ( | LinkedListInfo * |  | ) |

WizardExport void * * GetNextKeyInHashmap | ( | HashmapInfo * |  | ) |

WizardExport void * * * GetNextValueInHashmap | ( | HashmapInfo * |  | ) |

WizardExport void * * * * GetNextValueInLinkedList | ( | LinkedListInfo * |  | ) |

WizardExport size_t GetNumberOfElementsInLinkedList | ( | const LinkedListInfo * |  | ) |

WizardExport size_t GetNumberOfEntriesInHashmap | ( | const HashmapInfo * |  | ) |

References _HashmapInfo::debug, _HashmapInfo::entries, GetWizardModule, LogWizardEvent(), _HashmapInfo::signature, TraceEvent, WizardFalse, and WizardSignature.

WizardExport void * * * * * GetValueFromHashmap | ( | HashmapInfo * | ,
|  | const void * |  |
| ) |  |  |

WizardExport void * * * * * * GetValueFromLinkedList | ( | LinkedListInfo * | ,
|  | const | size_t |
| ) |  |  |

WizardExport size_t HashPointerType | ( | const void * |  | ) |

WizardExport size_t HashStringInfoType | ( | const void * |  | ) |

References GetStringInfoDatum(), and GetStringInfoLength().

WizardExport size_t HashStringType | ( | const void * |  | ) |

WizardExport WizardBooleanType InsertValueInLinkedList | ( | LinkedListInfo * | ,
|  | const | size_t,
|  | const void * |  |
| ) |  |  |

WizardExport WizardBooleanType InsertValueInSortedLinkedList | ( | LinkedListInfo * | ,
|  | int(*)(const void *, const void *) | ,
|  | void ** | ,
|  | const void * |  |
| ) |  |  |

WizardExport WizardBooleanType IsHashmapEmpty | ( | const HashmapInfo * |  | ) |

WizardExport WizardBooleanType IsLinkedListEmpty | ( | const LinkedListInfo * |  | ) |

WizardExport WizardBooleanType LinkedListToArray | ( | LinkedListInfo * | ,
|  | void ** |  |
| ) |  |  |

WizardExport HashmapInfo* * NewHashmap | ( | const | size_t,
|  | size_t(*)(const void *) | ,
|  | WizardBooleanType(*)(const void *, const void *) | ,
|  | void * | *)(void *,
|  | void * | *)(void * |
| ) |  |  |

WizardExport LinkedListInfo* * NewLinkedList | ( | const | size_t | ) |

References AcquireWizardMemory(), AllocateSemaphoreInfo(), CacheDomain, _LinkedListInfo::capacity, _LinkedListInfo::debug, _LinkedListInfo::elements, _LinkedListInfo::head, MemoryError, _LinkedListInfo::next, ResetWizardMemory(), _LinkedListInfo::semaphore, _LinkedListInfo::signature, _LinkedListInfo::tail, and ThrowWizardFatalError.

Referenced by GetConfigureOptions(), GetConfigurePaths(), GetExceptionInfo(), IncreaseHashmapCapacity(), LoadConfigureList(), LoadConfigureLists(), LoadLogList(), LoadLogLists(), LoadMimeList(), and PutEntryInHashmap().

WizardExport WizardBooleanType PutEntryInHashmap | ( | HashmapInfo * | ,
|  | const void * | ,
|  | const void * |  |
| ) |  |  |

References AcquireWizardMemory(), _HashmapInfo::capacity, _HashmapInfo::compare, _HashmapInfo::debug, _LinkedListInfo::elements, _HashmapInfo::entries, GetNextValueInLinkedList(), GetWizardModule, _HashmapInfo::hash, _EntryInfo::hash, _LinkedListInfo::head, IncreaseHashmapCapacity(), InsertValueInLinkedList(), _EntryInfo::key, LockSemaphoreInfo(), LogWizardEvent(), _HashmapInfo::map, NewLinkedList(), _LinkedListInfo::next, _HashmapInfo::relinquish_key, _HashmapInfo::relinquish_value, RelinquishWizardMemory(), RemoveElementFromLinkedList(), _HashmapInfo::semaphore, _HashmapInfo::signature, TraceEvent, UnlockSemaphoreInfo(), _EntryInfo::value, WizardFalse, WizardSignature, and WizardTrue.

WizardExport void * * * * * * * RemoveElementByValueFromLinkedList | ( | LinkedListInfo * | ,
|  | const void * |  |
| ) |  |  |

WizardExport void * * * * * * * * RemoveElementFromLinkedList | ( | LinkedListInfo * | ,
|  | const | size_t |
| ) |  |  |

WizardExport void * * * * * * * * * RemoveEntryFromHashmap | ( | HashmapInfo * | ,
|  | const void * |  |
| ) |  |  |

WizardExport void * * * * * * * * * * RemoveLastElementFromLinkedList | ( | LinkedListInfo * |  | ) |

WizardExport void * * * * * * * * * * ResetHashmapIterator | ( | HashmapInfo * |  | ) |

WizardExport void * * * * * * * * * * ResetLinkedListIterator | ( | LinkedListInfo * |  | ) |

References _LinkedListInfo::debug, GetWizardModule, _LinkedListInfo::head, LockSemaphoreInfo(), LogWizardEvent(), _LinkedListInfo::next, _LinkedListInfo::semaphore, _LinkedListInfo::signature, TraceEvent, UnlockSemaphoreInfo(), WizardFalse, and WizardSignature.

Referenced by CatchException(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetConfigureOptions(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), and InheritException().