cpl_hash_set.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef CPL_HASH_SET_H_INCLUDED
00032 #define CPL_HASH_SET_H_INCLUDED
00033
00034 #include "cpl_port.h"
00035
00047 CPL_C_START
00048
00049
00050
00051 typedef struct _CPLHashSet CPLHashSet;
00052
00053 typedef unsigned long (*CPLHashSetHashFunc)(const void* elt);
00054
00055 typedef int (*CPLHashSetEqualFunc)(const void* elt1, const void* elt2);
00056
00057 typedef void (*CPLHashSetFreeEltFunc)(void* elt);
00058
00059 typedef int (*CPLHashSetIterEltFunc)(void* elt, void* user_data);
00060
00061
00062
00063 CPLHashSet CPL_DLL * CPLHashSetNew(CPLHashSetHashFunc fnHashFunc,
00064 CPLHashSetEqualFunc fnEqualFunc,
00065 CPLHashSetFreeEltFunc fnFreeEltFunc);
00066
00067 void CPL_DLL CPLHashSetDestroy(CPLHashSet* set);
00068
00069 void CPL_DLL CPLHashSetClear(CPLHashSet* set);
00070
00071 int CPL_DLL CPLHashSetSize(const CPLHashSet* set);
00072
00073 void CPL_DLL CPLHashSetForeach(CPLHashSet* set,
00074 CPLHashSetIterEltFunc fnIterFunc,
00075 void* user_data);
00076
00077 int CPL_DLL CPLHashSetInsert(CPLHashSet* set, void* elt);
00078
00079 void CPL_DLL * CPLHashSetLookup(CPLHashSet* set, const void* elt);
00080
00081 int CPL_DLL CPLHashSetRemove(CPLHashSet* set, const void* elt);
00082 int CPL_DLL CPLHashSetRemoveDeferRehash(CPLHashSet* set, const void* elt);
00083
00084 unsigned long CPL_DLL CPLHashSetHashPointer(const void* elt);
00085
00086 int CPL_DLL CPLHashSetEqualPointer(const void* elt1, const void* elt2);
00087
00088 unsigned long CPL_DLL CPLHashSetHashStr(const void * pszStr);
00089
00090 int CPL_DLL CPLHashSetEqualStr(const void* pszStr1, const void* pszStr2);
00091
00092 CPL_C_END
00093
00094 #endif