ucx/cx/map.h

branch
newapi
changeset 324
ce13a778654a
parent 253
087cc9216f28
equal deleted inserted replaced
323:38cb8e3992e8 324:ce13a778654a
54 /** Type for map class definitions. */ 54 /** Type for map class definitions. */
55 typedef struct cx_map_class_s cx_map_class; 55 typedef struct cx_map_class_s cx_map_class;
56 56
57 /** Structure for the UCX map. */ 57 /** Structure for the UCX map. */
58 struct cx_map_s { 58 struct cx_map_s {
59 CX_COLLECTION_MEMBERS 59 /**
60 * Base attributes.
61 */
62 CX_COLLECTION_BASE;
60 /** The map class definition. */ 63 /** The map class definition. */
61 cx_map_class *cl; 64 cx_map_class *cl;
62 }; 65 };
63 66
64 /** 67 /**
108 /** 111 /**
109 * Returns an element. 112 * Returns an element.
110 */ 113 */
111 __attribute__((__nonnull__, __warn_unused_result__)) 114 __attribute__((__nonnull__, __warn_unused_result__))
112 void *(*get)( 115 void *(*get)(
113 CxMap const *map, 116 const CxMap *map,
114 CxHashKey key 117 CxHashKey key
115 ); 118 );
116 119
117 /** 120 /**
118 * Removes an element. 121 * Removes an element.
126 129
127 /** 130 /**
128 * Creates an iterator for this map. 131 * Creates an iterator for this map.
129 */ 132 */
130 __attribute__((__nonnull__, __warn_unused_result__)) 133 __attribute__((__nonnull__, __warn_unused_result__))
131 CxIterator (*iterator)(CxMap const *map, enum cx_map_iterator_type type); 134 CxIterator (*iterator)(const CxMap *map, enum cx_map_iterator_type type);
132 }; 135 };
133 136
134 /** 137 /**
135 * A map entry. 138 * A map entry.
136 */ 139 */
137 struct cx_map_entry_s { 140 struct cx_map_entry_s {
138 /** 141 /**
139 * A pointer to the key. 142 * A pointer to the key.
140 */ 143 */
141 CxHashKey const *key; 144 const CxHashKey *key;
142 /** 145 /**
143 * A pointer to the value. 146 * A pointer to the value.
144 */ 147 */
145 void *value; 148 void *value;
146 }; 149 };
161 * @param map the map 164 * @param map the map
162 * @see cxMapStorePointers() 165 * @see cxMapStorePointers()
163 */ 166 */
164 __attribute__((__nonnull__)) 167 __attribute__((__nonnull__))
165 static inline void cxMapStoreObjects(CxMap *map) { 168 static inline void cxMapStoreObjects(CxMap *map) {
166 map->store_pointer = false; 169 map->collection.store_pointer = false;
167 } 170 }
168 171
169 /** 172 /**
170 * Advises the map to only store pointers to the objects. 173 * Advises the map to only store pointers to the objects.
171 * 174 *
178 * @param map the map 181 * @param map the map
179 * @see cxMapStoreObjects() 182 * @see cxMapStoreObjects()
180 */ 183 */
181 __attribute__((__nonnull__)) 184 __attribute__((__nonnull__))
182 static inline void cxMapStorePointers(CxMap *map) { 185 static inline void cxMapStorePointers(CxMap *map) {
183 map->store_pointer = true; 186 map->collection.store_pointer = true;
184 map->item_size = sizeof(void *); 187 map->collection.elem_size = sizeof(void *);
185 } 188 }
186 189
190 /**
191 * Returns true, if this map is storing pointers instead of the actual data.
192 *
193 * @param map
194 * @return true, if this map is storing pointers
195 * @see cxMapStorePointers()
196 */
197 __attribute__((__nonnull__))
198 static inline bool cxMapIsStoringPointers(const CxMap *map) {
199 return map->collection.store_pointer;
200 }
187 201
188 /** 202 /**
189 * Deallocates the memory of the specified map. 203 * Deallocates the memory of the specified map.
190 * 204 *
191 * @param map the map to be destroyed 205 * @param map the map to be destroyed
204 __attribute__((__nonnull__)) 218 __attribute__((__nonnull__))
205 static inline void cxMapClear(CxMap *map) { 219 static inline void cxMapClear(CxMap *map) {
206 map->cl->clear(map); 220 map->cl->clear(map);
207 } 221 }
208 222
223 /**
224 * Returns the number of elements in this map.
225 *
226 * @param map the map
227 * @return the number of stored elements
228 */
229 __attribute__((__nonnull__))
230 static inline size_t cxMapSize(const CxMap *map) {
231 return map->collection.size;
232 }
233
209 234
210 // TODO: set-like map operations (union, intersect, difference) 235 // TODO: set-like map operations (union, intersect, difference)
211 236
212 /** 237 /**
213 * Creates a value iterator for a map. 238 * Creates a value iterator for a map.
217 * 242 *
218 * @param map the map to create the iterator for 243 * @param map the map to create the iterator for
219 * @return an iterator for the currently stored values 244 * @return an iterator for the currently stored values
220 */ 245 */
221 __attribute__((__nonnull__, __warn_unused_result__)) 246 __attribute__((__nonnull__, __warn_unused_result__))
222 static inline CxIterator cxMapIteratorValues(CxMap const *map) { 247 static inline CxIterator cxMapIteratorValues(const CxMap *map) {
223 return map->cl->iterator(map, CX_MAP_ITERATOR_VALUES); 248 return map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
224 } 249 }
225 250
226 /** 251 /**
227 * Creates a key iterator for a map. 252 * Creates a key iterator for a map.
233 * 258 *
234 * @param map the map to create the iterator for 259 * @param map the map to create the iterator for
235 * @return an iterator for the currently stored keys 260 * @return an iterator for the currently stored keys
236 */ 261 */
237 __attribute__((__nonnull__, __warn_unused_result__)) 262 __attribute__((__nonnull__, __warn_unused_result__))
238 static inline CxIterator cxMapIteratorKeys(CxMap const *map) { 263 static inline CxIterator cxMapIteratorKeys(const CxMap *map) {
239 return map->cl->iterator(map, CX_MAP_ITERATOR_KEYS); 264 return map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
240 } 265 }
241 266
242 /** 267 /**
243 * Creates an iterator for a map. 268 * Creates an iterator for a map.
251 * @return an iterator for the currently stored entries 276 * @return an iterator for the currently stored entries
252 * @see cxMapIteratorKeys() 277 * @see cxMapIteratorKeys()
253 * @see cxMapIteratorValues() 278 * @see cxMapIteratorValues()
254 */ 279 */
255 __attribute__((__nonnull__, __warn_unused_result__)) 280 __attribute__((__nonnull__, __warn_unused_result__))
256 static inline CxIterator cxMapIterator(CxMap const *map) { 281 static inline CxIterator cxMapIterator(const CxMap *map) {
257 return map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS); 282 return map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
258 } 283 }
259 284
260 285
261 /** 286 /**
266 * 291 *
267 * @param map the map to create the iterator for 292 * @param map the map to create the iterator for
268 * @return an iterator for the currently stored values 293 * @return an iterator for the currently stored values
269 */ 294 */
270 __attribute__((__nonnull__, __warn_unused_result__)) 295 __attribute__((__nonnull__, __warn_unused_result__))
271 CxMutIterator cxMapMutIteratorValues(CxMap *map); 296 CxIterator cxMapMutIteratorValues(CxMap *map);
272 297
273 /** 298 /**
274 * Creates a mutating iterator over the keys of a map. 299 * Creates a mutating iterator over the keys of a map.
275 * 300 *
276 * The elements of the iterator are keys of type CxHashKey. 301 * The elements of the iterator are keys of type CxHashKey.
280 * 305 *
281 * @param map the map to create the iterator for 306 * @param map the map to create the iterator for
282 * @return an iterator for the currently stored keys 307 * @return an iterator for the currently stored keys
283 */ 308 */
284 __attribute__((__nonnull__, __warn_unused_result__)) 309 __attribute__((__nonnull__, __warn_unused_result__))
285 CxMutIterator cxMapMutIteratorKeys(CxMap *map); 310 CxIterator cxMapMutIteratorKeys(CxMap *map);
286 311
287 /** 312 /**
288 * Creates a mutating iterator for a map. 313 * Creates a mutating iterator for a map.
289 * 314 *
290 * The elements of the iterator are key/value pairs of type CxMapEntry. 315 * The elements of the iterator are key/value pairs of type CxMapEntry.
296 * @return an iterator for the currently stored entries 321 * @return an iterator for the currently stored entries
297 * @see cxMapMutIteratorKeys() 322 * @see cxMapMutIteratorKeys()
298 * @see cxMapMutIteratorValues() 323 * @see cxMapMutIteratorValues()
299 */ 324 */
300 __attribute__((__nonnull__, __warn_unused_result__)) 325 __attribute__((__nonnull__, __warn_unused_result__))
301 CxMutIterator cxMapMutIterator(CxMap *map); 326 CxIterator cxMapMutIterator(CxMap *map);
302 327
303 #ifdef __cplusplus 328 #ifdef __cplusplus
304 } // end the extern "C" block here, because we want to start overloading 329 } // end the extern "C" block here, because we want to start overloading
305 330
306 /** 331 /**
364 * @return 0 on success, non-zero value on failure 389 * @return 0 on success, non-zero value on failure
365 */ 390 */
366 __attribute__((__nonnull__)) 391 __attribute__((__nonnull__))
367 static inline int cxMapPut( 392 static inline int cxMapPut(
368 CxMap *map, 393 CxMap *map,
369 char const *key, 394 const char *key,
370 void *value 395 void *value
371 ) { 396 ) {
372 return map->cl->put(map, cx_hash_key_str(key), value); 397 return map->cl->put(map, cx_hash_key_str(key), value);
373 } 398 }
374 399
379 * @param key the key 404 * @param key the key
380 * @return the value 405 * @return the value
381 */ 406 */
382 __attribute__((__nonnull__, __warn_unused_result__)) 407 __attribute__((__nonnull__, __warn_unused_result__))
383 static inline void *cxMapGet( 408 static inline void *cxMapGet(
384 CxMap const *map, 409 const CxMap *map,
385 CxHashKey const &key 410 CxHashKey const &key
386 ) { 411 ) {
387 return map->cl->get(map, key); 412 return map->cl->get(map, key);
388 } 413 }
389 414
394 * @param key the key 419 * @param key the key
395 * @return the value 420 * @return the value
396 */ 421 */
397 __attribute__((__nonnull__, __warn_unused_result__)) 422 __attribute__((__nonnull__, __warn_unused_result__))
398 static inline void *cxMapGet( 423 static inline void *cxMapGet(
399 CxMap const *map, 424 const CxMap *map,
400 cxstring const &key 425 cxstring const &key
401 ) { 426 ) {
402 return map->cl->get(map, cx_hash_key_cxstr(key)); 427 return map->cl->get(map, cx_hash_key_cxstr(key));
403 } 428 }
404 429
409 * @param key the key 434 * @param key the key
410 * @return the value 435 * @return the value
411 */ 436 */
412 __attribute__((__nonnull__, __warn_unused_result__)) 437 __attribute__((__nonnull__, __warn_unused_result__))
413 static inline void *cxMapGet( 438 static inline void *cxMapGet(
414 CxMap const *map, 439 const CxMap *map,
415 cxmutstr const &key 440 cxmutstr const &key
416 ) { 441 ) {
417 return map->cl->get(map, cx_hash_key_cxstr(key)); 442 return map->cl->get(map, cx_hash_key_cxstr(key));
418 } 443 }
419 444
424 * @param key the key 449 * @param key the key
425 * @return the value 450 * @return the value
426 */ 451 */
427 __attribute__((__nonnull__, __warn_unused_result__)) 452 __attribute__((__nonnull__, __warn_unused_result__))
428 static inline void *cxMapGet( 453 static inline void *cxMapGet(
429 CxMap const *map, 454 const CxMap *map,
430 char const *key 455 const char *key
431 ) { 456 ) {
432 return map->cl->get(map, cx_hash_key_str(key)); 457 return map->cl->get(map, cx_hash_key_str(key));
433 } 458 }
434 459
435 /** 460 /**
513 * @see cxMapDetach() 538 * @see cxMapDetach()
514 */ 539 */
515 __attribute__((__nonnull__)) 540 __attribute__((__nonnull__))
516 static inline void cxMapRemove( 541 static inline void cxMapRemove(
517 CxMap *map, 542 CxMap *map,
518 char const *key 543 const char *key
519 ) { 544 ) {
520 (void) map->cl->remove(map, cx_hash_key_str(key), true); 545 (void) map->cl->remove(map, cx_hash_key_str(key), true);
521 } 546 }
522 547
523 /** 548 /**
601 * @see cxMapRemoveAndGet() 626 * @see cxMapRemoveAndGet()
602 */ 627 */
603 __attribute__((__nonnull__)) 628 __attribute__((__nonnull__))
604 static inline void cxMapDetach( 629 static inline void cxMapDetach(
605 CxMap *map, 630 CxMap *map,
606 char const *key 631 const char *key
607 ) { 632 ) {
608 (void) map->cl->remove(map, cx_hash_key_str(key), false); 633 (void) map->cl->remove(map, cx_hash_key_str(key), false);
609 } 634 }
610 635
611 /** 636 /**
709 * @see cxMapDetach() 734 * @see cxMapDetach()
710 */ 735 */
711 __attribute__((__nonnull__, __warn_unused_result__)) 736 __attribute__((__nonnull__, __warn_unused_result__))
712 static inline void *cxMapRemoveAndGet( 737 static inline void *cxMapRemoveAndGet(
713 CxMap *map, 738 CxMap *map,
714 char const *key 739 const char *key
715 ) { 740 ) {
716 return map->cl->remove(map, cx_hash_key_str(key), !map->store_pointer); 741 return map->cl->remove(map, cx_hash_key_str(key), !map->store_pointer);
717 } 742 }
718 743
719 #else // __cplusplus 744 #else // __cplusplus
778 * @return 0 on success, non-zero value on failure 803 * @return 0 on success, non-zero value on failure
779 */ 804 */
780 __attribute__((__nonnull__)) 805 __attribute__((__nonnull__))
781 static inline int cx_map_put_str( 806 static inline int cx_map_put_str(
782 CxMap *map, 807 CxMap *map,
783 char const *key, 808 const char *key,
784 void *value 809 void *value
785 ) { 810 ) {
786 return map->cl->put(map, cx_hash_key_str(key), value); 811 return map->cl->put(map, cx_hash_key_str(key), value);
787 } 812 }
788 813
797 #define cxMapPut(map, key, value) _Generic((key), \ 822 #define cxMapPut(map, key, value) _Generic((key), \
798 CxHashKey: cx_map_put, \ 823 CxHashKey: cx_map_put, \
799 cxstring: cx_map_put_cxstr, \ 824 cxstring: cx_map_put_cxstr, \
800 cxmutstr: cx_map_put_mustr, \ 825 cxmutstr: cx_map_put_mustr, \
801 char*: cx_map_put_str, \ 826 char*: cx_map_put_str, \
802 char const*: cx_map_put_str) \ 827 const char*: cx_map_put_str) \
803 (map, key, value) 828 (map, key, value)
804 829
805 /** 830 /**
806 * Retrieves a value by using a key. 831 * Retrieves a value by using a key.
807 * 832 *
809 * @param key the key 834 * @param key the key
810 * @return the value 835 * @return the value
811 */ 836 */
812 __attribute__((__nonnull__, __warn_unused_result__)) 837 __attribute__((__nonnull__, __warn_unused_result__))
813 static inline void *cx_map_get( 838 static inline void *cx_map_get(
814 CxMap const *map, 839 const CxMap *map,
815 CxHashKey key 840 CxHashKey key
816 ) { 841 ) {
817 return map->cl->get(map, key); 842 return map->cl->get(map, key);
818 } 843 }
819 844
824 * @param key the key 849 * @param key the key
825 * @return the value 850 * @return the value
826 */ 851 */
827 __attribute__((__nonnull__, __warn_unused_result__)) 852 __attribute__((__nonnull__, __warn_unused_result__))
828 static inline void *cx_map_get_cxstr( 853 static inline void *cx_map_get_cxstr(
829 CxMap const *map, 854 const CxMap *map,
830 cxstring key 855 cxstring key
831 ) { 856 ) {
832 return map->cl->get(map, cx_hash_key_cxstr(key)); 857 return map->cl->get(map, cx_hash_key_cxstr(key));
833 } 858 }
834 859
839 * @param key the key 864 * @param key the key
840 * @return the value 865 * @return the value
841 */ 866 */
842 __attribute__((__nonnull__, __warn_unused_result__)) 867 __attribute__((__nonnull__, __warn_unused_result__))
843 static inline void *cx_map_get_mustr( 868 static inline void *cx_map_get_mustr(
844 CxMap const *map, 869 const CxMap *map,
845 cxmutstr key 870 cxmutstr key
846 ) { 871 ) {
847 return map->cl->get(map, cx_hash_key_cxstr(key)); 872 return map->cl->get(map, cx_hash_key_cxstr(key));
848 } 873 }
849 874
854 * @param key the key 879 * @param key the key
855 * @return the value 880 * @return the value
856 */ 881 */
857 __attribute__((__nonnull__, __warn_unused_result__)) 882 __attribute__((__nonnull__, __warn_unused_result__))
858 static inline void *cx_map_get_str( 883 static inline void *cx_map_get_str(
859 CxMap const *map, 884 const CxMap *map,
860 char const *key 885 const char *key
861 ) { 886 ) {
862 return map->cl->get(map, cx_hash_key_str(key)); 887 return map->cl->get(map, cx_hash_key_str(key));
863 } 888 }
864 889
865 /** 890 /**
872 #define cxMapGet(map, key) _Generic((key), \ 897 #define cxMapGet(map, key) _Generic((key), \
873 CxHashKey: cx_map_get, \ 898 CxHashKey: cx_map_get, \
874 cxstring: cx_map_get_cxstr, \ 899 cxstring: cx_map_get_cxstr, \
875 cxmutstr: cx_map_get_mustr, \ 900 cxmutstr: cx_map_get_mustr, \
876 char*: cx_map_get_str, \ 901 char*: cx_map_get_str, \
877 char const*: cx_map_get_str) \ 902 const char*: cx_map_get_str) \
878 (map, key) 903 (map, key)
879 904
880 /** 905 /**
881 * Removes a key/value-pair from the map by using the key. 906 * Removes a key/value-pair from the map by using the key.
882 * 907 *
926 * @param key the key 951 * @param key the key
927 */ 952 */
928 __attribute__((__nonnull__)) 953 __attribute__((__nonnull__))
929 static inline void cx_map_remove_str( 954 static inline void cx_map_remove_str(
930 CxMap *map, 955 CxMap *map,
931 char const *key 956 const char *key
932 ) { 957 ) {
933 (void) map->cl->remove(map, cx_hash_key_str(key), true); 958 (void) map->cl->remove(map, cx_hash_key_str(key), true);
934 } 959 }
935 960
936 /** 961 /**
950 #define cxMapRemove(map, key) _Generic((key), \ 975 #define cxMapRemove(map, key) _Generic((key), \
951 CxHashKey: cx_map_remove, \ 976 CxHashKey: cx_map_remove, \
952 cxstring: cx_map_remove_cxstr, \ 977 cxstring: cx_map_remove_cxstr, \
953 cxmutstr: cx_map_remove_mustr, \ 978 cxmutstr: cx_map_remove_mustr, \
954 char*: cx_map_remove_str, \ 979 char*: cx_map_remove_str, \
955 char const*: cx_map_remove_str) \ 980 const char*: cx_map_remove_str) \
956 (map, key) 981 (map, key)
957 982
958 /** 983 /**
959 * Detaches a key/value-pair from the map by using the key 984 * Detaches a key/value-pair from the map by using the key
960 * without invoking the destructor. 985 * without invoking the destructor.
1008 * @param key the key 1033 * @param key the key
1009 */ 1034 */
1010 __attribute__((__nonnull__)) 1035 __attribute__((__nonnull__))
1011 static inline void cx_map_detach_str( 1036 static inline void cx_map_detach_str(
1012 CxMap *map, 1037 CxMap *map,
1013 char const *key 1038 const char *key
1014 ) { 1039 ) {
1015 (void) map->cl->remove(map, cx_hash_key_str(key), false); 1040 (void) map->cl->remove(map, cx_hash_key_str(key), false);
1016 } 1041 }
1017 1042
1018 /** 1043 /**
1032 #define cxMapDetach(map, key) _Generic((key), \ 1057 #define cxMapDetach(map, key) _Generic((key), \
1033 CxHashKey: cx_map_detach, \ 1058 CxHashKey: cx_map_detach, \
1034 cxstring: cx_map_detach_cxstr, \ 1059 cxstring: cx_map_detach_cxstr, \
1035 cxmutstr: cx_map_detach_mustr, \ 1060 cxmutstr: cx_map_detach_mustr, \
1036 char*: cx_map_detach_str, \ 1061 char*: cx_map_detach_str, \
1037 char const*: cx_map_detach_str) \ 1062 const char*: cx_map_detach_str) \
1038 (map, key) 1063 (map, key)
1039 1064
1040 /** 1065 /**
1041 * Removes a key/value-pair from the map by using the key. 1066 * Removes a key/value-pair from the map by using the key.
1042 * 1067 *
1048 __attribute__((__nonnull__, __warn_unused_result__)) 1073 __attribute__((__nonnull__, __warn_unused_result__))
1049 static inline void *cx_map_remove_and_get( 1074 static inline void *cx_map_remove_and_get(
1050 CxMap *map, 1075 CxMap *map,
1051 CxHashKey key 1076 CxHashKey key
1052 ) { 1077 ) {
1053 return map->cl->remove(map, key, !map->store_pointer); 1078 return map->cl->remove(map, key, !map->collection.store_pointer);
1054 } 1079 }
1055 1080
1056 /** 1081 /**
1057 * Removes a key/value-pair from the map by using the key. 1082 * Removes a key/value-pair from the map by using the key.
1058 * 1083 *
1064 __attribute__((__nonnull__, __warn_unused_result__)) 1089 __attribute__((__nonnull__, __warn_unused_result__))
1065 static inline void *cx_map_remove_and_get_cxstr( 1090 static inline void *cx_map_remove_and_get_cxstr(
1066 CxMap *map, 1091 CxMap *map,
1067 cxstring key 1092 cxstring key
1068 ) { 1093 ) {
1069 return map->cl->remove(map, cx_hash_key_cxstr(key), !map->store_pointer); 1094 return map->cl->remove(map, cx_hash_key_cxstr(key), !map->collection.store_pointer);
1070 } 1095 }
1071 1096
1072 /** 1097 /**
1073 * Removes a key/value-pair from the map by using the key. 1098 * Removes a key/value-pair from the map by using the key.
1074 * 1099 *
1080 __attribute__((__nonnull__, __warn_unused_result__)) 1105 __attribute__((__nonnull__, __warn_unused_result__))
1081 static inline void *cx_map_remove_and_get_mustr( 1106 static inline void *cx_map_remove_and_get_mustr(
1082 CxMap *map, 1107 CxMap *map,
1083 cxmutstr key 1108 cxmutstr key
1084 ) { 1109 ) {
1085 return map->cl->remove(map, cx_hash_key_cxstr(key), !map->store_pointer); 1110 return map->cl->remove(map, cx_hash_key_cxstr(key), !map->collection.store_pointer);
1086 } 1111 }
1087 1112
1088 /** 1113 /**
1089 * Removes a key/value-pair from the map by using the key. 1114 * Removes a key/value-pair from the map by using the key.
1090 * 1115 *
1094 * in the map or the map is not storing pointers 1119 * in the map or the map is not storing pointers
1095 */ 1120 */
1096 __attribute__((__nonnull__, __warn_unused_result__)) 1121 __attribute__((__nonnull__, __warn_unused_result__))
1097 static inline void *cx_map_remove_and_get_str( 1122 static inline void *cx_map_remove_and_get_str(
1098 CxMap *map, 1123 CxMap *map,
1099 char const *key 1124 const char *key
1100 ) { 1125 ) {
1101 return map->cl->remove(map, cx_hash_key_str(key), !map->store_pointer); 1126 return map->cl->remove(map, cx_hash_key_str(key), !map->collection.store_pointer);
1102 } 1127 }
1103 1128
1104 /** 1129 /**
1105 * Removes a key/value-pair from the map by using the key. 1130 * Removes a key/value-pair from the map by using the key.
1106 * 1131 *
1123 #define cxMapRemoveAndGet(map, key) _Generic((key), \ 1148 #define cxMapRemoveAndGet(map, key) _Generic((key), \
1124 CxHashKey: cx_map_remove_and_get, \ 1149 CxHashKey: cx_map_remove_and_get, \
1125 cxstring: cx_map_remove_and_get_cxstr, \ 1150 cxstring: cx_map_remove_and_get_cxstr, \
1126 cxmutstr: cx_map_remove_and_get_mustr, \ 1151 cxmutstr: cx_map_remove_and_get_mustr, \
1127 char*: cx_map_remove_and_get_str, \ 1152 char*: cx_map_remove_and_get_str, \
1128 char const*: cx_map_remove_and_get_str) \ 1153 const char*: cx_map_remove_and_get_str) \
1129 (map, key) 1154 (map, key)
1130 1155
1131 #endif // __cplusplus 1156 #endif // __cplusplus
1132 1157
1133 #endif // UCX_MAP_H 1158 #endif // UCX_MAP_H

mercurial