cdcontainers
0.1.1
Library of data containers and collections for C programming language.
|
Functions | |
enum cdc_stat | cdc_map_ctor (const struct cdc_map_table *table, struct cdc_map **m, struct cdc_data_info *info) |
Constructs an empty map. More... | |
enum cdc_stat | cdc_map_ctorl (const struct cdc_map_table *table, struct cdc_map **m, struct cdc_data_info *info,...) |
Constructs a map, initialized by an variable number of pointers on cdc_pair's(first - key, and the second - value). The last item must be CDC_END. More... | |
enum cdc_stat | cdc_map_ctorv (const struct cdc_map_table *table, struct cdc_map **m, struct cdc_data_info *info, va_list args) |
Constructs a map, initialized by args. The last item must be CDC_END. More... | |
void | cdc_map_dtor (struct cdc_map *m) |
Destroys the map. More... | |
enum cdc_stat cdc_map_ctor | ( | const struct cdc_map_table * | table, |
struct cdc_map ** | m, | ||
struct cdc_data_info * | info | ||
) |
Constructs an empty map.
[in] | table | - table of a map implementation. It can be cdc_map_avl, cdc_map_splay, cdc_map_map, cdc_map_htable. |
[out] | m | - cdc_map |
[in] | info | - cdc_data_info |
Example of map constracting with hash table implementation:
enum cdc_stat cdc_map_ctorl | ( | const struct cdc_map_table * | table, |
struct cdc_map ** | m, | ||
struct cdc_data_info * | info, | ||
... | |||
) |
Constructs a map, initialized by an variable number of pointers on cdc_pair's(first - key, and the second - value). The last item must be CDC_END.
[in] | table | - table of a map implementation. It can be cdc_map_avl, cdc_map_splay, cdc_map_map, cdc_map_htable. |
[out] | m | - cdc_map |
[in] | info | - cdc_data_info |
Example:
enum cdc_stat cdc_map_ctorv | ( | const struct cdc_map_table * | table, |
struct cdc_map ** | m, | ||
struct cdc_data_info * | info, | ||
va_list | args | ||
) |
Constructs a map, initialized by args. The last item must be CDC_END.
[in] | table | - table of a map implementation. It can be cdc_map_avl, cdc_map_splay, cdc_map_map, cdc_map_htable. |
[out] | m | - cdc_map |
[in] | info | - cdc_data_info |