libyasm

libyasm/hamt.h

Go to the documentation of this file.
00001 
00030 #ifndef YASM_HAMT_H
00031 #define YASM_HAMT_H
00032 
00033 #ifndef YASM_LIB_DECL
00034 #define YASM_LIB_DECL
00035 #endif
00036 
00038 typedef struct HAMT HAMT;
00040 typedef struct HAMTEntry HAMTEntry;
00041 
00048 YASM_LIB_DECL
00049 HAMT *HAMT_create(int nocase, /*@exits@*/ void (*error_func)
00050     (const char *file, unsigned int line, const char *message));
00051 
00057 YASM_LIB_DECL
00058 void HAMT_destroy(/*@only@*/ HAMT *hamt,
00059                   void (*deletefunc) (/*@only@*/ void *data));
00060 
00077 YASM_LIB_DECL
00078 /*@dependent@*/ void *HAMT_insert(HAMT *hamt, /*@dependent@*/ const char *str,
00079                                   /*@only@*/ void *data, int *replace,
00080                                   void (*deletefunc) (/*@only@*/ void *data));
00081 
00087 YASM_LIB_DECL
00088 /*@dependent@*/ /*@null@*/ void *HAMT_search(HAMT *hamt, const char *str);
00089 
00097 YASM_LIB_DECL
00098 int HAMT_traverse(HAMT *hamt, /*@null@*/ void *d,
00099                   int (*func) (/*@dependent@*/ /*@null@*/ void *node,
00100                                /*@null@*/ void *d));
00101 
00106 YASM_LIB_DECL
00107 const HAMTEntry *HAMT_first(const HAMT *hamt);
00108 
00113 YASM_LIB_DECL
00114 /*@null@*/ const HAMTEntry *HAMT_next(const HAMTEntry *prev);
00115 
00120 YASM_LIB_DECL
00121 void *HAMTEntry_get_data(const HAMTEntry *entry);
00122 
00123 #endif