Changeset 2204 for trunk/psLib/src/collections/psHash.h
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psHash.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psHash.h
r1441 r2204 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004- 08-09 23:40:55$13 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-10-27 00:57:31 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 22 22 * \{ 23 23 */ 24 #include<stdbool.h>25 24 26 25 #include "psList.h" … … 30 29 { 31 30 char *key; ///< key for this item of data 32 void *data; ///< the data itself31 psPtr data; ///< the data itself 33 32 struct psHashBucket* next; ///< list of other possible keys 34 33 } … … 40 39 typedef struct psHash 41 40 { 42 intnbucket; ///< Number of buckets in hash table.41 psS32 nbucket; ///< Number of buckets in hash table. 43 42 psHashBucket* *buckets; ///< The bucket data. 44 43 } … … 46 45 47 46 /// Allocate hash buckets in table. 48 psHash* psHashAlloc( intnbucket ///< The number of buckets to allocate.47 psHash* psHashAlloc(psS32 nbucket ///< The number of buckets to allocate. 49 48 ); 50 49 51 50 /// Insert entry into table. 52 bool psHashAdd(psHash* table, ///< table to insert in53 const char *key, ///< key to use54 void *data ///< data to insert55 );51 psBool psHashAdd(psHash* table, ///< table to insert in 52 const char *key, ///< key to use 53 psPtr data ///< data to insert 54 ); 56 55 57 56 /// Lookup key in table. 58 void *psHashLookup(psHash* table, ///< table to lookup key in57 psPtr psHashLookup(psHash* table, ///< table to lookup key in 59 58 const char *key ///< key to lookup 60 59 ); 61 60 62 61 /// Remove key from table. 63 bool psHashRemove(psHash* table, ///< table to lookup key in64 const char *key ///< key to lookup65 );62 psBool psHashRemove(psHash* table, ///< table to lookup key in 63 const char *key ///< key to lookup 64 ); 66 65 67 66 /// List all keys in table.
Note:
See TracChangeset
for help on using the changeset viewer.
