134 const void * key,
void * val,
void cstl_xtor_func_t(void *obj, void *priv)
Type for functions called to construct, clear, or destroy an object.
int cstl_compare_func_t(const void *obj1, const void *obj2, void *priv)
Function type for comparing (in)equality of two objects.
int cstl_map_erase(cstl_map_t *map, const void *key, cstl_map_iterator_t *i)
Erase the element with the supplied key from the map.
void cstl_map_clear(cstl_map_t *map, cstl_xtor_func_t *clr, void *priv)
Remove all elements from the map.
static size_t cstl_map_size(const cstl_map_t *const map)
Return the number of elements in the map.
void cstl_map_find(const cstl_map_t *map, const void *key, cstl_map_iterator_t *i)
Find an element in the map with a matching key.
void cstl_map_init(cstl_map_t *map, cstl_compare_func_t *cmp, void *priv)
Initialize a map.
static bool cstl_map_iterator_eq(const cstl_map_iterator_t *const a, const cstl_map_iterator_t *const b)
Compare two iterators for equality.
void cstl_map_erase_iterator(cstl_map_t *map, cstl_map_iterator_t *i)
Erase the element pointed to by the iterator.
int cstl_map_insert(cstl_map_t *map, const void *key, void *val, cstl_map_iterator_t *i)
Insert a key/value pair into the map.
const cstl_map_iterator_t * cstl_map_iterator_end(const cstl_map_t *map)
Return an iterator that refers to the end of the map.
static size_t cstl_rbtree_size(const struct cstl_rbtree *const t)
Get the number of objects in the tree.
A pointer to an element within the map.
void * val
Pointer to the value contained by the element.
const void * key
Pointer to the key associated with the element.