|
cdcontainers
0.1.1
Library of data containers and collections for C programming language.
|
Functions | |
| void | cdc_splay_tree_clear (struct cdc_splay_tree *t) |
| Removes all the elements from the splay_tree. More... | |
| enum cdc_stat | cdc_splay_tree_insert (struct cdc_splay_tree *t, void *key, void *value, struct cdc_pair_splay_tree_iter_bool *ret) |
| Inserts an element into the container, if the container doesn't already contain an element with an equivalent key. More... | |
| enum cdc_stat | cdc_splay_tree_insert1 (struct cdc_splay_tree *t, void *key, void *value, struct cdc_splay_tree_iter *it, bool *inserted) |
| Inserts an element into the container, if the container doesn't already contain an element with an equivalent key. More... | |
| enum cdc_stat | cdc_splay_tree_insert_or_assign (struct cdc_splay_tree *t, void *key, void *value, struct cdc_pair_splay_tree_iter_bool *ret) |
| Inserts an element or assigns to the current element if the key already exists. More... | |
| enum cdc_stat | cdc_splay_tree_insert_or_assign1 (struct cdc_splay_tree *t, void *key, void *value, struct cdc_splay_tree_iter *it, bool *inserted) |
| Inserts an element or assigns to the current element if the key already exists. More... | |
| size_t | cdc_splay_tree_erase (struct cdc_splay_tree *t, void *key) |
| Removes the element (if one exists) with the key equivalent to key. More... | |
| void | cdc_splay_tree_swap (struct cdc_splay_tree *a, struct cdc_splay_tree *b) |
| Swaps splay_trees a and b. This operation is very fast and never fails. More... | |
| void cdc_splay_tree_clear | ( | struct cdc_splay_tree * | t | ) |
Removes all the elements from the splay_tree.
| [in] | t | - cdc_splay_tree |
| enum cdc_stat cdc_splay_tree_insert | ( | struct cdc_splay_tree * | t, |
| void * | key, | ||
| void * | value, | ||
| struct cdc_pair_splay_tree_iter_bool * | ret | ||
| ) |
Inserts an element into the container, if the container doesn't already contain an element with an equivalent key.
| [in] | t | - cdc_splay_tree |
| [in] | key | - key of the element |
| [in] | value | - value of the element |
| [out] | ret | - pair consisting of an iterator to the inserted element (or to the element that prevented the insertion) and a bool denoting whether the insertion took place. The pointer can be equal to NULL. |
| enum cdc_stat cdc_splay_tree_insert1 | ( | struct cdc_splay_tree * | t, |
| void * | key, | ||
| void * | value, | ||
| struct cdc_splay_tree_iter * | it, | ||
| bool * | inserted | ||
| ) |
Inserts an element into the container, if the container doesn't already contain an element with an equivalent key.
| [in] | t | - cdc_splay_tree |
| [in] | key | - key of the element |
| [in] | value | - value of the element |
| [out] | it | - iterator to the inserted element (or to the element that prevented the insertion). The pointer can be equal to NULL. |
| [out] | inserted | - bool denoting whether the insertion took place. The pointer can be equal to NULL. |
| enum cdc_stat cdc_splay_tree_insert_or_assign | ( | struct cdc_splay_tree * | t, |
| void * | key, | ||
| void * | value, | ||
| struct cdc_pair_splay_tree_iter_bool * | ret | ||
| ) |
Inserts an element or assigns to the current element if the key already exists.
| [in] | t | - cdc_splay_tree |
| [in] | key | - key of the element |
| [in] | value | - value of the element |
| [out] | ret | - pair. The bool component is true if the insertion took place and false if the assignment took place. The iterator component is pointing at the element that was inserted or updated. |
| enum cdc_stat cdc_splay_tree_insert_or_assign1 | ( | struct cdc_splay_tree * | t, |
| void * | key, | ||
| void * | value, | ||
| struct cdc_splay_tree_iter * | it, | ||
| bool * | inserted | ||
| ) |
Inserts an element or assigns to the current element if the key already exists.
| [in] | t | - cdc_splay_tree |
| [in] | key | - key of the element |
| [in] | value | - value of the element |
| [out] | it | - iterator is pointing at the element that was inserted or updated. The pointer can be equal to NULL |
| [out] | inserted | - bool is true if the insertion took place and false if the assignment took place. The pointer can be equal to NULL |
| size_t cdc_splay_tree_erase | ( | struct cdc_splay_tree * | t, |
| void * | key | ||
| ) |
Removes the element (if one exists) with the key equivalent to key.
| [in] | t | - cdc_splay_tree |
| [in] | key | - key value of the elements to remove |
| void cdc_splay_tree_swap | ( | struct cdc_splay_tree * | a, |
| struct cdc_splay_tree * | b | ||
| ) |
Swaps splay_trees a and b. This operation is very fast and never fails.
| [in,out] | a | - cdc_splay_tree |
| [in,out] | b | - cdc_splay_tree |
1.8.13