00001 #ifndef H_HASH
00002 #define H_HASH
00003
00009 typedef struct hashTable_s * hashTable;
00010
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014
00016 typedef unsigned int (*hashFunctionType) (const void * string) ;
00018 typedef int (*hashEqualityType) (const void * key1, const void * key2) ;
00019
00025 unsigned int hashFunctionString(const void * string) ;
00026
00033 int hashEqualityString(const void * key1, const void * key2) ;
00034
00046 hashTable htCreate(int numBuckets, int keySize, int freeData,
00047 hashFunctionType fn, hashEqualityType eq) ;
00048
00053 void htFree( hashTable ht);
00054
00061 void htAddEntry(hashTable ht, const void * key,
00062 const void * data) ;
00063
00073 int htGetEntry(hashTable ht, const void * key, const void *** data,
00074 int * dataCount, const void ** tableKey)
00075 ;
00076
00083 int htHasEntry(hashTable ht, const void * key) ;
00084
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088
00089 #endif