Compare keys callback.
typedef int (*FCompareKeysCB)(void *a, void *b);
Construct key callback.
typedef void (*FConstructKeyCB)(void *mem, void *key);
Map.
typedef struct Map { uint sig; byte wobj[256]; } Map;
Get item count.
API uint MapGetItemCount(Map *map);
map: Map.
returns: Item count.
Get key.
API void *MapGetKey(Map *map, uint index);
map: Map.
index: Index.
returns: Item.
Get item.
API void *MapGetItem(Map *map, uint index);
map: Map.
index: Index.
returns: Item.
Find item by key.
API void *MapFindItem(Map *map, void *key);
map: Map.
key: Key.
returns: Item or 0.
Add item.
API void *MapAddItem(Map *map, void *key);
map: Map.
key: Key.
returns: Item.
Delete item.
API void MapDelItem(Map *map, void *key);
map: Map.
key: Key.
Delete all items.
API void MapClear(Map *map);
map: Map.
Initialize map.
API void MapInit(Map *map, uint itemSize, uint keySize, uint incr, FCompareKeysCB CompareKeys,
map: Map.
itemSize: Item size.
keySize: Key size.
incr: Increment.
CompareKeys: Compare keys callback.
ConstructKey: Construct key callback.
IDestruct: Item destruct callback or 0.
KDestruct: Key destruct callback or 0.
Release map.
API void MapRel(Map *map);
map: Map.