Defines | |
| #define | cucon_pcmap_int_none cucon_ucmap_int_none |
Functions | |
| cucon_pcmap_t | cucon_pcmap_empty () |
| cu_bool_t | cucon_pcmap_is_empty (cucon_pcmap_t map) |
| cucon_pcmap_t | cucon_pcmap_insert_ptr (cucon_pcmap_t map, void *key, void *val) |
| cucon_pcmap_t | cucon_pcmap_insert_int (cucon_pcmap_t map, void *key, int val) |
| void * | cucon_pcmap_find (cucon_pcmap_t map, void *key) |
| int | cucon_pcmap_find_int (cucon_pcmap_t map, void *key) |
| cu_bool_t | cucon_pcmap_conj_ptr (cucon_pcmap_t map, cu_clop(cb, cu_bool_t, void *key, void *val)) |
| cu_bool_t | cucon_pcmap_conj_int (cucon_pcmap_t map, cu_clop(cb, cu_bool_t, void *key, int val)) |
| void | cucon_pcmap_dump (cucon_pcmap_t map, FILE *out) |
This is a light wrapper over cucon/ucmap.h: Constructive Maps from Unsigned Integers to Pointers.
Sequentially conjunct cb over mappings in increasing key order.
References cu_clop, and cucon_ucmap_conj_int().
Sequentially conjunct cb over mappings in increasing key order.
References cu_clop, and cucon_ucmap_conj_ptr().
| void cucon_pcmap_dump | ( | cucon_pcmap_t | map, | |
| FILE * | out | |||
| ) |
Debug dump.
References cucon_ucmap_dump().
| cucon_pcmap_t cucon_pcmap_empty | ( | ) |
The empty map. Due to the constructive nature, this always returns the same value.
| void* cucon_pcmap_find | ( | cucon_pcmap_t | map, | |
| void * | key | |||
| ) |
Return the mapping of key in map, or NULL if none.
References cucon_ucmap_find_ptr().
| int cucon_pcmap_find_int | ( | cucon_pcmap_t | map, | |
| void * | key | |||
| ) |
Return the mapping of key in map, or (uintptr_t)-1 of none.
References cucon_ucmap_find_int().
| cucon_pcmap_t cucon_pcmap_insert_int | ( | cucon_pcmap_t | map, | |
| void * | key, | |||
| int | val | |||
| ) |
Return a map which agrees on map everywhere, except that key maps to val. That is a mapping for key is either inserted or replaced.
References cucon_ucmap_insert_int().
| cucon_pcmap_t cucon_pcmap_insert_ptr | ( | cucon_pcmap_t | map, | |
| void * | key, | |||
| void * | val | |||
| ) |
Return a map which agrees on map everywhere, except that key maps to val. That is a mapping for key is either inserted or replaced.
References cucon_ucmap_insert_ptr().
| cu_bool_t cucon_pcmap_is_empty | ( | cucon_pcmap_t | map | ) |
True iff map is the empty map. Due to the constructive nature, there is only one empty map.