44 |
44 |
45 static bool cx_empty_map_iter_valid(cx_attr_unused const void *iter) { |
45 static bool cx_empty_map_iter_valid(cx_attr_unused const void *iter) { |
46 return false; |
46 return false; |
47 } |
47 } |
48 |
48 |
49 static CxIterator cx_empty_map_iterator( |
49 static CxMapIterator cx_empty_map_iterator( |
50 const struct cx_map_s *map, |
50 const struct cx_map_s *map, |
51 cx_attr_unused enum cx_map_iterator_type type |
51 cx_attr_unused enum cx_map_iterator_type type |
52 ) { |
52 ) { |
53 CxIterator iter = {0}; |
53 CxMapIterator iter = {0}; |
54 iter.src_handle.c = map; |
54 iter.map.c = map; |
55 iter.base.valid = cx_empty_map_iter_valid; |
55 iter.base.valid = cx_empty_map_iter_valid; |
56 return iter; |
56 return iter; |
57 } |
57 } |
58 |
58 |
59 static struct cx_map_class_s cx_empty_map_class = { |
59 static struct cx_map_class_s cx_empty_map_class = { |
81 |
81 |
82 CxMap *const cxEmptyMap = &cx_empty_map; |
82 CxMap *const cxEmptyMap = &cx_empty_map; |
83 |
83 |
84 // </editor-fold> |
84 // </editor-fold> |
85 |
85 |
86 CxIterator cxMapMutIteratorValues(CxMap *map) { |
86 CxMapIterator cxMapMutIteratorValues(CxMap *map) { |
87 CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES); |
87 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES); |
88 it.base.mutating = true; |
88 it.base.mutating = true; |
89 return it; |
89 return it; |
90 } |
90 } |
91 |
91 |
92 CxIterator cxMapMutIteratorKeys(CxMap *map) { |
92 CxMapIterator cxMapMutIteratorKeys(CxMap *map) { |
93 CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS); |
93 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS); |
94 it.base.mutating = true; |
94 it.base.mutating = true; |
95 return it; |
95 return it; |
96 } |
96 } |
97 |
97 |
98 CxIterator cxMapMutIterator(CxMap *map) { |
98 CxMapIterator cxMapMutIterator(CxMap *map) { |
99 CxIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS); |
99 CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS); |
100 it.base.mutating = true; |
100 it.base.mutating = true; |
101 return it; |
101 return it; |
102 } |
102 } |
103 |
103 |
104 void cxMapFree(CxMap *map) { |
104 void cxMapFree(CxMap *map) { |