Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

hashTable.h

Go to the documentation of this file.
00001 /* ndk - [ hashTable.h ]
00002  *
00003  * Routines for maintaining a generic hash table
00004  *
00005  * (c)2005 dcipher / neuraldk
00006  *           www.neuraldk.org
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 

Generated on Wed Mar 22 20:36:33 2006 for ndk by  doxygen 1.4.4