1 #ifndef CLIB_HASHTABLE_PROTOS_H 2 #define CLIB_HASHTABLE_PROTOS_H 3 4 /* 5 * hashtable.library C prototypes 6 * 7 * Copyright © 2014-2015 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef _SYS_TYPES_H_ 11 # include <sys/types.h> 12 #endif 13 14 #ifndef EXEC_TYPES_H 15 # include <exec/types.h> 16 #endif 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif /* __cplusplus */ 21 22 struct TagItem; 23 24 APTR CreateHashTableTagList(CONST struct TagItem *taglist); 25 VOID DeleteHashTable(CONST_APTR hashtable); 26 VOID ClearHashTable(CONST_APTR hashtable); 27 size_t GetHashTableAttribute(CONST_APTR hashtable, size_t attr); 28 29 BOOL InsertHash(CONST_APTR hashtable, size_t key, CONST_APTR data); 30 31 BOOL RemoveHashByKey(CONST_APTR hashtable, size_t key, APTR *dataptr); 32 BOOL RemoveHashByData(CONST_APTR hashtable, CONST_APTR data, size_t *keyptr); 33 34 BOOL GetHashDataByKey(CONST_APTR hashtable, size_t key, APTR *dataptr); 35 BOOL GetHashKeyByData(CONST_APTR hashtable, CONST_APTR data, size_t *keyptr); 36 37 size_t IterateHashTable(CONST_APTR hashtable, BOOL (*iterator)(CONST_APTR, size_t, APTR, APTR), APTR userdata); 38 size_t ResizeHashTable(CONST_APTR hashtable); 39 40 #if !defined(USE_INLINE_STDARG) 41 CONST_APTR CreateHashTableTags(ULONG Tag1, ...); 42 #endif 43 44 #ifdef __cplusplus 45 } 46 #endif /* __cplusplus */ 47 48 #endif /* CLIB_HASHTABLE_PROTOS_H */