27typedef struct _cx_tnode_ *cx_tree_iterator;
28typedef const struct _cx_tnode_ *cx_tree_const_iterator;
30typedef struct _cx_tree_ cx_tree;
121cx_tree_iterator
cx_tree_next(
const cx_tree *, cx_tree_const_iterator);
cx_tree_iterator cx_tree_insert_equal(cx_tree *, cxcptr, cxcptr)
Insert data into a tree.
Definition cxtree.c:1599
cxbool(* cx_tree_compare_func)(cxcptr, cxcptr)
The tree's key comparison operator function.
Definition cxtree.h:72
cxsize cx_tree_erase(cx_tree *, cxcptr)
Erase all elements from a tree matching the provided key.
Definition cxtree.c:1689
cxbool cx_tree_empty(const cx_tree *)
Check whether a tree is empty.
Definition cxtree.c:1118
cx_tree_iterator cx_tree_insert_unique(cx_tree *, cxcptr, cxcptr)
Attempt to insert data into a tree.
Definition cxtree.c:1574
cx_tree_iterator cx_tree_lower_bound(const cx_tree *, cxcptr)
Find the beginning of a subsequence.
Definition cxtree.c:1448
cxsize cx_tree_max_size(const cx_tree *)
Get the maximum number of pairs possible.
Definition cxtree.c:1233
void cx_tree_clear(cx_tree *)
Remove all pairs from a tree.
Definition cxtree.c:1092
cxsize cx_tree_size(const cx_tree *)
Get the actual number of pairs in the tree.
Definition cxtree.c:1212
cx_tree_compare_func cx_tree_key_comp(const cx_tree *)
Get the key comparison function.
Definition cxtree.c:1258
cx_tree_iterator cx_tree_upper_bound(const cx_tree *, cxcptr)
Find the end of a subsequence.
Definition cxtree.c:1475
cxptr cx_tree_get_value(const cx_tree *, cx_tree_const_iterator)
Get the data from a given iterator position.
Definition cxtree.c:1392
cxptr cx_tree_get_key(const cx_tree *, cx_tree_const_iterator)
Get the key from a given iterator position.
Definition cxtree.c:1367
void cx_tree_delete(cx_tree *)
Destroy a tree and all its elements.
Definition cxtree.c:1188
cxptr cx_tree_assign(cx_tree *, cx_tree_iterator, cxcptr)
Assign data to an iterator position.
Definition cxtree.c:1332
cx_tree_iterator cx_tree_begin(const cx_tree *)
Get an iterator to the first pair in the tree.
Definition cxtree.c:982
cx_tree * cx_tree_new(cx_tree_compare_func, cx_free_func, cx_free_func)
Create a new tree without any elements.
Definition cxtree.c:1152
cx_tree_iterator cx_tree_previous(const cx_tree *, cx_tree_const_iterator)
Get an iterator for the previous pair in the tree.
Definition cxtree.c:1063
cx_tree_iterator cx_tree_next(const cx_tree *, cx_tree_const_iterator)
Get an iterator for the next pair in the tree.
Definition cxtree.c:1031
void cx_tree_equal_range(const cx_tree *, cxcptr, cx_tree_iterator *, cx_tree_iterator *)
Find a subsequence matching a given key.
Definition cxtree.c:1505
cx_tree_iterator cx_tree_find(const cx_tree *, cxcptr)
Locate an element in the tree.
Definition cxtree.c:1421
cxbool cx_tree_verify(const cx_tree *)
Validate a tree.
Definition cxtree.c:1727
cx_tree_iterator cx_tree_end(const cx_tree *)
Get an iterator for the position after the last pair in the tree.
Definition cxtree.c:1006
void cx_tree_erase_range(cx_tree *, cx_tree_iterator, cx_tree_iterator)
Erase a range of elements from a tree.
Definition cxtree.c:1656
void cx_tree_erase_position(cx_tree *, cx_tree_iterator)
Erase an element from a tree.
Definition cxtree.c:1624
cxsize cx_tree_count(const cx_tree *, cxcptr)
Get the number of elements matching a key.
Definition cxtree.c:1531
void cx_tree_swap(cx_tree *, cx_tree *)
Swap the contents of two trees.
Definition cxtree.c:1282