| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #ifndef _MAGICKCORE_HASHMAP_H |
|---|
| 19 | #define _MAGICKCORE_HASHMAP_H |
|---|
| 20 | |
|---|
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | #define SmallHashmapSize 17 |
|---|
| 26 | #define MediumHashmapSize 509 |
|---|
| 27 | #define LargeHashmapSize 8191 |
|---|
| 28 | #define HugeHashmapSize 131071 |
|---|
| 29 | |
|---|
| 30 | typedef struct _HashmapInfo |
|---|
| 31 | HashmapInfo; |
|---|
| 32 | |
|---|
| 33 | typedef struct _LinkedListInfo |
|---|
| 34 | LinkedListInfo; |
|---|
| 35 | |
|---|
| 36 | extern MagickExport HashmapInfo |
|---|
| 37 | *DestroyHashmap(HashmapInfo *), |
|---|
| 38 | *NewHashmap(const unsigned long,size_t (*)(const void *), |
|---|
| 39 | MagickBooleanType (*)(const void *,const void *),void *(*)(void *), |
|---|
| 40 | void *(*)(void *)); |
|---|
| 41 | |
|---|
| 42 | extern MagickExport LinkedListInfo |
|---|
| 43 | *DestroyLinkedList(LinkedListInfo *,void *(*)(void *)), |
|---|
| 44 | *NewLinkedList(const unsigned long); |
|---|
| 45 | |
|---|
| 46 | extern MagickExport MagickBooleanType |
|---|
| 47 | AppendValueToLinkedList(LinkedListInfo *,const void *), |
|---|
| 48 | CompareHashmapString(const void *,const void *), |
|---|
| 49 | CompareHashmapStringInfo(const void *,const void *), |
|---|
| 50 | InsertValueInLinkedList(LinkedListInfo *,const unsigned long,const void *), |
|---|
| 51 | InsertValueInSortedLinkedList(LinkedListInfo *, |
|---|
| 52 | int (*)(const void *,const void *),void **,const void *), |
|---|
| 53 | IsHashmapEmpty(const HashmapInfo *), |
|---|
| 54 | IsLinkedListEmpty(const LinkedListInfo *), |
|---|
| 55 | LinkedListToArray(LinkedListInfo *,void **), |
|---|
| 56 | PutEntryInHashmap(HashmapInfo *,const void *,const void *); |
|---|
| 57 | |
|---|
| 58 | extern MagickExport size_t |
|---|
| 59 | HashPointerType(const void *), |
|---|
| 60 | HashStringType(const void *), |
|---|
| 61 | HashStringInfoType(const void *); |
|---|
| 62 | |
|---|
| 63 | extern MagickExport unsigned long |
|---|
| 64 | GetNumberOfElementsInLinkedList(const LinkedListInfo *), |
|---|
| 65 | GetNumberOfEntriesInHashmap(const HashmapInfo *); |
|---|
| 66 | |
|---|
| 67 | extern MagickExport void |
|---|
| 68 | ClearLinkedList(LinkedListInfo *,void *(*)(void *)), |
|---|
| 69 | *GetLastValueInLinkedList(LinkedListInfo *), |
|---|
| 70 | *GetNextKeyInHashmap(HashmapInfo *), |
|---|
| 71 | *GetNextValueInHashmap(HashmapInfo *), |
|---|
| 72 | *GetNextValueInLinkedList(LinkedListInfo *), |
|---|
| 73 | *GetValueFromHashmap(HashmapInfo *,const void *), |
|---|
| 74 | *GetValueFromLinkedList(LinkedListInfo *,const unsigned long), |
|---|
| 75 | *RemoveElementByValueFromLinkedList(LinkedListInfo *,const void *), |
|---|
| 76 | *RemoveElementFromLinkedList(LinkedListInfo *,const unsigned long), |
|---|
| 77 | *RemoveEntryFromHashmap(HashmapInfo *,const void *), |
|---|
| 78 | *RemoveLastElementFromLinkedList(LinkedListInfo *), |
|---|
| 79 | ResetHashmapIterator(HashmapInfo *), |
|---|
| 80 | ResetLinkedListIterator(LinkedListInfo *); |
|---|
| 81 | |
|---|
| 82 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 83 | } |
|---|
| 84 | #endif |
|---|
| 85 | |
|---|
| 86 | #endif |
|---|