Changeset 1426 for trunk/psLib/src/collections/psHash.h
- Timestamp:
- Aug 9, 2004, 12:44:25 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psHash.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psHash.h
r1420 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-09 2 0:29:43$13 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 typedef struct psHashBucket 30 30 { 31 char *key; // /< key for this item of data32 void *data; // /< the data itself33 struct psHashBucket *next; // /< list of other possible keys31 char *key; ///< key for this item of data 32 void *data; ///< the data itself 33 struct psHashBucket *next; ///< list of other possible keys 34 34 } 35 35 psHashBucket; … … 40 40 typedef struct psHash 41 41 { 42 int nbucket; // /< Number of buckets in hash table.43 psHashBucket **buckets; // /< The bucket data.42 int nbucket; ///< Number of buckets in hash table. 43 psHashBucket **buckets; ///< The bucket data. 44 44 } 45 45 psHash; 46 46 47 47 /// Allocate hash buckets in table. 48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.48 psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate. 49 49 ); 50 50 51 51 /// Insert entry into table. 52 bool psHashAdd(psHash * table, // /< table to insert in53 const char *key, // /< key to use54 void *data // /< data to insert52 bool psHashAdd(psHash * table, ///< table to insert in 53 const char *key, ///< key to use 54 void *data ///< data to insert 55 55 ); 56 56 57 57 /// Lookup key in table. 58 void *psHashLookup(psHash * table, // /< table to lookup key in59 const char *key // /< key to lookup58 void *psHashLookup(psHash * table, ///< table to lookup key in 59 const char *key ///< key to lookup 60 60 ); 61 61 62 62 /// Remove key from table. 63 bool psHashRemove(psHash * table, // /< table to lookup key in64 const char *key // /< key to lookup63 bool psHashRemove(psHash * table, ///< table to lookup key in 64 const char *key ///< key to lookup 65 65 ); 66 66 67 67 /// List all keys in table. 68 psList *psHashKeyList(psHash * table // /< table to list keys from.68 psList *psHashKeyList(psHash * table ///< table to list keys from. 69 69 ); 70 70
Note:
See TracChangeset
for help on using the changeset viewer.
