00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _GATTABLEANYKEY_H_
00024 #define _GATTABLEANYKEY_H_ 1
00025
00026 #include "GAT.h"
00027
00028
00029 typedef GATuint32 (* GATTable_GetKeySizeProc)(GATTable_const, void const *);
00030 typedef GATBool (* GATTable_EqualKeysProc)(GATTable_const, void const *,
00031 void const *);
00032 typedef unsigned long (* GATTable_GetHashProc)(GATTable_const, void const *);
00033 typedef int (* GATTable_CloneKeyProc)(GATTable_const, void const *, void **);
00034 typedef void (* GATTable_DestroyKeyProc)(GATTable_const, void **);
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 GATBool
00054 GATTable_Default_Equal_Keys(GATTable_const table, void const *key1,
00055 const void *key2);
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 unsigned long
00070 GATTable_Default_Hash_sdbm(GATTable_const table, void const *key);
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 GATResult
00086 GATTable_Default_Clone_Key(GATTable_const table, void const *src,
00087 void **dest);
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 void
00099 GATTable_Default_Destroy_Key(GATTable_const table, void **key);
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 GATTable GATTable_CreateAnyKey(GATTable_GetKeySizeProc get_keysize,
00121 GATTable_EqualKeysProc equalkeys, GATTable_CloneKeyProc copykey,
00122 GATTable_GetHashProc get_hash, GATTable_DestroyKeyProc destroy_key);
00123
00124 #ifdef __cplusplus
00125 }
00126 #endif
00127
00128 #endif