Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
source code to manage the Windows Unix and Mac file formats.
[simgrid.git] / tools / tesh2 / include / dictionary.h
1 #ifndef __dictionary_H\r
2 #define __dictionary_H\r
3 \r
4 #include <htable.h>\r
5 \r
6 #ifdef __cplusplus\r
7 extern "C" {\r
8 #endif\r
9 \r
10 #ifndef __FN_FINALIZE_T_DEFINED\r
11 typedef int (*fn_finalize_t)(void**);\r
12 #define __FN_FINALIZE_T_DEFINED\r
13 #endif\r
14 \r
15 typedef struct s_dictionary\r
16 {\r
17         htable_t htable;\r
18 }s_dictionary_t,* dictionary_t;\r
19 \r
20 \r
21 dictionary_t\r
22 dictionary_new(fn_finalize_t fn_finalize);\r
23 \r
24 int\r
25 dictionary_set(dictionary_t dictionary,const char* key, const void* val);\r
26 \r
27 void*\r
28 dictionary_get(dictionary_t dictionary,const char* key);\r
29 \r
30 int\r
31 dictionary_free(dictionary_t* dictionaryptr);\r
32 \r
33 int\r
34 dictionary_clear(dictionary_t dictionary);\r
35 \r
36 int\r
37 dictionary_get_size(dictionary_t dictionary);\r
38 \r
39 int\r
40 dictionary_is_empty(dictionary_t dictionary);\r
41 \r
42 void*\r
43 dictionary_remove(dictionary_t dictionary,const char* key);\r
44 \r
45 #ifdef __cplusplus\r
46 }\r
47 #endif\r
48 \r
49 \r
50 #endif /* !__dictionary_H */\r