|
MagickCore
6.7.5
|
00001 /* 00002 Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization 00003 dedicated to making software imaging solutions freely available. 00004 00005 You may not use this file except in compliance with the License. 00006 obtain a copy of the License at 00007 00008 http://www.imagemagick.org/script/license.php 00009 00010 Unless required by applicable law or agreed to in writing, software 00011 distributed under the License is distributed on an "AS IS" BASIS, 00012 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 See the License for the specific language governing permissions and 00014 limitations under the License. 00015 00016 MagickCore hash methods. 00017 */ 00018 #ifndef _MAGICKCORE_HASHMAP_H 00019 #define _MAGICKCORE_HASHMAP_H 00020 00021 #if defined(__cplusplus) || defined(c_plusplus) 00022 extern "C" { 00023 #endif 00024 00025 #define SmallHashmapSize 17 00026 #define MediumHashmapSize 509 00027 #define LargeHashmapSize 8191 00028 #define HugeHashmapSize 131071 00029 00030 typedef struct _HashmapInfo 00031 HashmapInfo; 00032 00033 typedef struct _LinkedListInfo 00034 LinkedListInfo; 00035 00036 extern MagickExport HashmapInfo 00037 *DestroyHashmap(HashmapInfo *), 00038 *NewHashmap(const size_t,size_t (*)(const void *),MagickBooleanType (*) 00039 (const void *,const void *),void *(*)(void *),void *(*)(void *)); 00040 00041 extern MagickExport LinkedListInfo 00042 *DestroyLinkedList(LinkedListInfo *,void *(*)(void *)), 00043 *NewLinkedList(const size_t); 00044 00045 extern MagickExport MagickBooleanType 00046 AppendValueToLinkedList(LinkedListInfo *,const void *), 00047 CompareHashmapString(const void *,const void *), 00048 CompareHashmapStringInfo(const void *,const void *), 00049 InsertValueInLinkedList(LinkedListInfo *,const size_t,const void *), 00050 InsertValueInSortedLinkedList(LinkedListInfo *, 00051 int (*)(const void *,const void *),void **,const void *), 00052 IsHashmapEmpty(const HashmapInfo *), 00053 IsLinkedListEmpty(const LinkedListInfo *), 00054 LinkedListToArray(LinkedListInfo *,void **), 00055 PutEntryInHashmap(HashmapInfo *,const void *,const void *); 00056 00057 extern MagickExport size_t 00058 GetNumberOfElementsInLinkedList(const LinkedListInfo *), 00059 GetNumberOfEntriesInHashmap(const HashmapInfo *), 00060 HashPointerType(const void *), 00061 HashStringType(const void *), 00062 HashStringInfoType(const void *); 00063 00064 extern MagickExport void 00065 ClearLinkedList(LinkedListInfo *,void *(*)(void *)), 00066 *GetLastValueInLinkedList(LinkedListInfo *), 00067 *GetNextKeyInHashmap(HashmapInfo *), 00068 *GetNextValueInHashmap(HashmapInfo *), 00069 *GetNextValueInLinkedList(LinkedListInfo *), 00070 *GetValueFromHashmap(HashmapInfo *,const void *), 00071 *GetValueFromLinkedList(LinkedListInfo *,const size_t), 00072 *RemoveElementByValueFromLinkedList(LinkedListInfo *,const void *), 00073 *RemoveElementFromLinkedList(LinkedListInfo *,const size_t), 00074 *RemoveEntryFromHashmap(HashmapInfo *,const void *), 00075 *RemoveLastElementFromLinkedList(LinkedListInfo *), 00076 ResetHashmapIterator(HashmapInfo *), 00077 ResetLinkedListIterator(LinkedListInfo *); 00078 00079 #if defined(__cplusplus) || defined(c_plusplus) 00080 } 00081 #endif 00082 00083 #endif