Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

lib/hash.h

Go to the documentation of this file.
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( /*@only@*/ hashTable ht);
00053 
00060 void htAddEntry(hashTable ht, /*@owned@*/ const void * key,
00061         /*@owned@*/ const void * data) /*@modifies ht */;
00062 
00072 int htGetEntry(hashTable ht, const void * key, /*@out@*/ const void *** data,
00073                 /*@out@*/ int * dataCount, /*@out@*/ const void ** tableKey)
00074                         /*@modifies *data, *dataCount, *tableKey @*/;
00075 
00082 int htHasEntry(hashTable ht, const void * key) /*@*/;
00083 
00084 #ifdef __cplusplus
00085 }
00086 #endif
00087 
00088 #endif

Generated at Mon May 21 08:53:39 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001