home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 13 / MA_Cover_13.bin / source / c / nfsd / src / hashtable.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-24  |  860 b   |  31 lines

  1. /*  Headers for hashtable handling
  2.  
  3.     ©1999 Joseph Walton
  4.  
  5.     This software is distributed under the terms of the GNU General Public
  6.     License; either version 2 of the License, or (at your option) any
  7.     later version.
  8. */
  9.  
  10. #ifndef NFSD_HASHTABLE_H
  11. #define NFSD_HASHTABLE_H
  12.  
  13. #include <exec/types.h>
  14.  
  15. typedef ULONG (*HashFunc)(APTR);
  16. typedef BOOL (*EqualsFunc)(APTR, APTR);
  17. //typedef void (*DataFreeFunc)(APTR);
  18. //typedef BOOL (*DataCallback)(APTR);
  19.  
  20. struct HashTable *htMakeNew(HashFunc hf, EqualsFunc ef);
  21. // void htFree(struct HashTable *ht, DataFreeFunc dff);
  22. BOOL htAdd(struct HashTable *ht, APTR key, APTR data);
  23. APTR htGet(struct HashTable *ht, APTR key);
  24. APTR htRemove(struct HashTable *ht, APTR key);
  25. // void forEach(struct HashTable *ht, DataCallback dc);
  26. LONG htGetSize(struct HashTable *ht);
  27. // double getStdDev(struct HashTable *ht);
  28.  
  29. #endif
  30.  
  31.