Changeset 257 for trunk/archive/pslib/include/psHash.h
- Timestamp:
- Mar 18, 2004, 9:37:58 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psHash.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psHash.h
r247 r257 8 8 9 9 /** DO WE NEED TO DEFINE HashTable? */ 10 typedef struct HashTable psHash; // !< Opaque type for a hash table10 typedef struct HashTable psHash; ///< Opaque type for a hash table 11 11 12 psHash *psHashAlloc(int nbucket //!< initial number of buckets 13 ); 14 void psHashFree(psHash *table, //!< hash table to be freed 15 void (*itemFree)(void *item) //!< how to free hashed data; or NULL 16 ); 12 /** Functions **************************************************************/ 13 /** \addtogroup DataGroup General Data Container Utilities 14 * \{ 15 */ 17 16 18 void *psHashInsert(psHash *table, //!< table to insert in 19 const char *key, //!< key to use 20 void *data, //!< data to insert 21 void (*itemFree)(void *item) //!< how to free hashed data; or NULL 22 ); 23 void *psHashLookup(psHash *table, //!< table to lookup key in 24 const char *key //!< key to lookup 25 ); 17 /// Allocate hash buckets in table. 18 psHash *psHashAlloc(int nbucket) ///< initial number of buckets 19 ; 26 20 27 void *psHashRemove(psHash *table, //!< table to lookup key in 28 const char *key //!< key to lookup 29 ); 21 /// Free hash buckets from table. 22 void psHashFree(psHash *table, ///< hash table to be freed 23 void (*itemFree)(void *item)) ///< how to free hashed data; or NULL 24 ; 30 25 26 /// Insert entry into table. 27 void *psHashInsert(psHash *table, ///< table to insert in 28 const char *key, ///< key to use 29 void *data, ///< data to insert 30 void (*itemFree)(void *item)) ///< how to free hashed data; or NULL 31 ; 32 33 /// Lookup key in table. 34 void *psHashLookup(psHash *table, ///< table to lookup key in 35 const char *key) ///< key to lookup 36 ; 37 38 /// Remove key from table. 39 void *psHashRemove(psHash *table, ///< table to lookup key in 40 const char *key) ///< key to lookup 41 ; 42 43 /* \} */ // End of DataGroup Functions 31 44 32 45 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
