00001
00002
00003
00004
00005
00006
00007
00008
00017 #ifndef __ndk_hashTable_h__
00018 #define __ndk_hashTable_h__
00019
00020 #include <errorCodes.h>
00021 #include <types.h>
00022
00027 const uint32 HashTableDefaultSize = 97;
00028
00029 typedef uint32 (*HashFunction) (void *key, uint32 keySize);
00030
00031 typedef struct _HashTable *HashTable;
00032
00033 ErrorCode hashTableCreate(HashTable *table, uint32 size, HashFunction hashFunction);
00034
00035 ErrorCode hashTableAdd(HashTable table, void *key, uint32 keySize, Pointer object);
00036
00037 ErrorCode hashTableAddString(HashTable table, String key, Pointer object);
00038
00039 ErrorCode hashTableGet(HashTable table, void *key, uint32 keySize, Pointer *object);
00040
00041 ErrorCode hashTableGetString(HashTable table, String key, Pointer *object);
00042
00043 ErrorCode hashTableDestroy(HashTable *table);
00044
00045 #endif
00046