00001 #ifndef H_HASH
00002 #define H_HASH
00003
00008 typedef struct hashTable_s * hashTable;
00009
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013
00015 typedef unsigned int (*hashFunctionType) (const void * string) ;
00017 typedef int (*hashEqualityType) (const void * key1, const void * key2) ;
00018
00024 unsigned int hashFunctionString(const void * string) ;
00025
00032 int hashEqualityString(const void * key1, const void * key2) ;
00033
00045 hashTable htCreate(int numBuckets, int keySize, int freeData,
00046 hashFunctionType fn, hashEqualityType eq) ;
00047
00052 void htFree( hashTable ht);
00053
00060 void htAddEntry(hashTable ht, const void * key,
00061 const void * data) ;
00062
00072 int htGetEntry(hashTable ht, const void * key, const void *** data,
00073 int * dataCount, const void ** tableKey)
00074 ;
00075
00082 int htHasEntry(hashTable ht, const void * key) ;
00083
00084 #ifdef __cplusplus
00085 }
00086 #endif
00087
00088 #endif