5 #ifndef MAP_H |
5 #ifndef MAP_H |
6 #define MAP_H |
6 #define MAP_H |
7 |
7 |
8 #include "ucx.h" |
8 #include "ucx.h" |
9 #include "string.h" |
9 #include "string.h" |
10 #include <stddef.h> |
10 #include <stdio.h> |
11 |
11 |
12 #ifdef __cplusplus |
12 #ifdef __cplusplus |
13 extern "C" { |
13 extern "C" { |
14 #endif |
14 #endif |
15 |
15 |
16 #define UCX_MAP_FOREACH(type,elm,map,iter) \ |
16 #define UCX_MAP_FOREACH(elm,iter) \ |
17 for(type elm;ucx_map_iter_next(&iter,(void*)&elm)==0;) |
17 for(elm;ucx_map_iter_next(&iter,(void*)&elm)==0;) |
18 |
18 |
19 typedef struct UcxMap UcxMap; |
19 typedef struct UcxMap UcxMap; |
20 typedef struct UcxKey UcxKey; |
20 typedef struct UcxKey UcxKey; |
21 typedef struct UcxMapElement UcxMapElement; |
21 typedef struct UcxMapElement UcxMapElement; |
22 typedef struct UcxMapIterator UcxMapIterator; |
22 typedef struct UcxMapIterator UcxMapIterator; |