15 #define CNArraySizeOfHashTable 256
18 struct CNHashTableItem ;
uint64_t(* CNCalcHashItemFuncRef)(const void *obj, void *info)
Function to calc hash value of item in CNHashTable.
Definition: CNHashTable.h:21
CNCalcHashItemFuncRef calcHashFunc
Function to calculate hash value.
Definition: CNHashTable.h:30
CNDestroyDataFuncRef destroyHashFunc
Function to destroy item.
Definition: CNHashTable.h:36
void(* CNDestroyDataFuncRef)(void *src, void *info, struct CNResource *resource)
Function to destroy item.
Definition: CNType.h:31
CNCompareDataFuncRef compareHashFunc
Function to compare items.
Definition: CNHashTable.h:32
CNCloneDataFuncRef cloneHashFunc
Function to clone items.
Definition: CNHashTable.h:34
void CNDestroyHashTable(struct CNHashTable *dst, void *info)
Destroy all contexts in CNHashTable.
struct CNResource * resource
Resource for hash table.
Definition: CNHashTable.h:45
void CNInitHashTable(struct CNHashTable *dst, const struct CNHashTableMethods *methods, struct CNResource *resource)
Initialize CNHashTable.
Hash table for any data.
Definition: CNHashTable.h:42
#define CNArraySizeOfHashTable
Array size of CNHashTable.
Definition: CNHashTable.h:15
struct CNHashTableItem * tableItems[CNArraySizeOfHashTable]
Array to store items.
Definition: CNHashTable.h:49
struct CNHashTableMethods * tableMethods
Methods to operate items in hash table.
Definition: CNHashTable.h:47
Define primitive data types.
Set of methods for item in CNHashTable These functions are called in CNHashTable. ...
Definition: CNHashTable.h:27
const void * CNSearchHashTable(const struct CNHashTable *table, const void *src, void *info)
Search item in CNHashTable.
const void * CNAddToHashTable(struct CNHashTable *table, const void *src, void *info)
Add item to CNHashTable.
int(* CNCompareDataFuncRef)(const void *s0, const void *s1, void *info)
Function to compare items in CNHashTable.
Definition: CNType.h:22
void *(* CNCloneDataFuncRef)(const void *src, void *info, struct CNResource *resource)
Function to clone the source data.
Definition: CNType.h:28