docs/Writerside/topics/map.h.md

changeset 1250
80a1d63ede19
parent 1249
aad755d296a7
equal deleted inserted replaced
1249:aad755d296a7 1250:80a1d63ede19
26 26
27 > If you want to lazy-initialize maps, you can use the global `cxEmptyMap` symbol as a placeholder instead of using a `NULL`-pointer. 27 > If you want to lazy-initialize maps, you can use the global `cxEmptyMap` symbol as a placeholder instead of using a `NULL`-pointer.
28 > While you *must not* insert elements into that map, you can safely access this map or create iterators. 28 > While you *must not* insert elements into that map, you can safely access this map or create iterators.
29 > This allows you to write clean code without checking for `NULL`-pointer everywhere. 29 > This allows you to write clean code without checking for `NULL`-pointer everywhere.
30 > You still need to make sure that the placeholder is replaced with an actual map before inserting elements. 30 > You still need to make sure that the placeholder is replaced with an actual map before inserting elements.
31
32 > In the Sections below, the type for the key is denoted `KeyType`.
33 > All functions are implemented as generics, so that the following types are supported:
34 > `CxHashKey`, `cxstring`, `cxmutstr`, `const char*`, and `char*`.
35 > {style="note"}
31 36
32 ## Examples 37 ## Examples
33 38
34 ```C 39 ```C
35 #include <stdio.h> 40 #include <stdio.h>
181 186
182 return 0; 187 return 0;
183 } 188 }
184 ``` 189 ```
185 190
186 > In the following Sections, the type for the key is denoted `KeyType`.
187 > All functions are implemented as generics, so that the following types are supported:
188 > `CxHashKey`, `cxstring`, `cxmutstr`, `const char*`, and `char*`.
189 > {style="note"}
190
191 ## Insert 191 ## Insert
192 192
193 ```C 193 ```C
194 #include <cx/map.h> 194 #include <cx/map.h>
195 195

mercurial