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

lib/hash.h

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

Generated at Thu Apr 19 15:29:42 2001 for rpm by doxygen1.2.6-20010408 written by Dimitri van Heesch, © 1997-2001