MagickCore 7.0.10
hashmap.h
Go to the documentation of this file.
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Wizard's Toolkit hash methods.
17*/
18#ifndef _WIZARDSTOOLKIT_HASHMAP_H
19#define _WIZARDSTOOLKIT_HASHMAP_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#define SmallHashmapSize 17
26#define MediumHashmapSize 509
27#define LargeHashmapSize 8191
28#define HugeHashmapSize 131071
29
30typedef struct _HashmapInfo
32
33typedef struct _LinkedListInfo
35
38 *NewHashmap(const size_t,size_t (*)(const void *),
39 WizardBooleanType (*)(const void *,const void *),void *(*)(void *),
40 void *(*)(void *));
41
43 *DestroyLinkedList(LinkedListInfo *,void *(*)(void *)),
44 *NewLinkedList(const size_t);
45
48 CompareHashmapString(const void *,const void *),
49 CompareHashmapStringInfo(const void *,const void *),
50 InsertValueInLinkedList(LinkedListInfo *,const size_t,const void *),
52 int (*)(const void *,const void *),void **,const void *),
56 PutEntryInHashmap(HashmapInfo *,const void *,const void *);
57
58extern WizardExport size_t
59 HashPointerType(const void *),
60 HashStringType(const void *),
61 HashStringInfoType(const void *);
62
63extern WizardExport size_t
66
67extern WizardExport void
68 ClearLinkedList(LinkedListInfo *,void *(*)(void *)),
81
82#if defined(__cplusplus) || defined(c_plusplus)
83}
84#endif
85
86#endif
WizardExport WizardBooleanType IsHashmapEmpty(const HashmapInfo *)
WizardExport size_t GetNumberOfElementsInLinkedList(const LinkedListInfo *)
WizardExport size_t HashPointerType(const void *)
WizardExport WizardBooleanType LinkedListToArray(LinkedListInfo *, void **)
WizardExport void * RemoveElementFromLinkedList(LinkedListInfo *, const size_t)
WizardExport void * RemoveElementByValueFromLinkedList(LinkedListInfo *, const void *)
WizardExport void * RemoveEntryFromHashmap(HashmapInfo *, const void *)
WizardExport WizardBooleanType AppendValueToLinkedList(LinkedListInfo *, const void *)
WizardExport WizardBooleanType InsertValueInLinkedList(LinkedListInfo *, const size_t, const void *)
WizardExport WizardBooleanType CompareHashmapString(const void *, const void *)
WizardExport void ResetHashmapIterator(HashmapInfo *)
WizardExport void * RemoveLastElementFromLinkedList(LinkedListInfo *)
WizardExport void * GetNextValueInHashmap(HashmapInfo *)
WizardExport void ClearLinkedList(LinkedListInfo *, void *(*)(void *))
WizardExport HashmapInfo * DestroyHashmap(HashmapInfo *)
WizardExport void * GetLastValueInLinkedList(LinkedListInfo *)
WizardExport void * GetValueFromLinkedList(LinkedListInfo *, const size_t)
WizardExport WizardBooleanType IsLinkedListEmpty(const LinkedListInfo *)
WizardExport void ResetLinkedListIterator(LinkedListInfo *)
Definition hashmap.c:1919
WizardExport LinkedListInfo * NewLinkedList(const size_t)
Definition hashmap.c:1362
WizardExport WizardBooleanType InsertValueInSortedLinkedList(LinkedListInfo *, int(*)(const void *, const void *), void **, const void *)
WizardExport LinkedListInfo * DestroyLinkedList(LinkedListInfo *, void *(*)(void *))
WizardExport size_t HashStringType(const void *)
WizardExport size_t GetNumberOfEntriesInHashmap(const HashmapInfo *)
Definition hashmap.c:646
WizardExport void * GetValueFromHashmap(HashmapInfo *, const void *)
WizardExport size_t HashStringInfoType(const void *)
Definition hashmap.c:941
WizardExport WizardBooleanType PutEntryInHashmap(HashmapInfo *, const void *, const void *)
Definition hashmap.c:1493
WizardExport HashmapInfo * NewHashmap(const size_t, size_t(*)(const void *), WizardBooleanType(*)(const void *, const void *), void *(*)(void *), void *(*)(void *))
WizardExport void * GetNextValueInLinkedList(LinkedListInfo *)
WizardExport WizardBooleanType CompareHashmapStringInfo(const void *, const void *)
WizardExport void * GetNextKeyInHashmap(HashmapInfo *)
#define WizardExport
WizardBooleanType
Definition wizard-type.h:26