cdcontainers
0.1.1
Library of data containers and collections for C programming language.
|
Functions | |
void | cdc_list_splice (struct cdc_list_iter *position, struct cdc_list_iter *first, struct cdc_list_iter *last) |
Transfers elements from one container, iterators (first, last] to another container at position before iterator position. More... | |
void | cdc_list_ssplice (struct cdc_list_iter *position, struct cdc_list_iter *first) |
Transfers elements from one container, iterators (first, end] to another container at position before iterator position. More... | |
void | cdc_list_lsplice (struct cdc_list_iter *position, struct cdc_list *other) |
Transfers all elements from container other to another container at position before iterator position. More... | |
void | cdc_list_merge (struct cdc_list *l, struct cdc_list *other) |
Merges two sorted lists into one. The lists should be sorted into ascending order. More... | |
void | cdc_list_cmerge (struct cdc_list *l, struct cdc_list *other, cdc_binary_pred_fn_t compare) |
Merges two sorted lists into one. The lists should be sorted. More... | |
void | cdc_list_erase_if (struct cdc_list *l, cdc_unary_pred_fn_t pred) |
Removes from the container all elements for which predicate pred returns true. More... | |
void | cdc_list_reverse (struct cdc_list *l) |
Reverses the order of elements in the container. More... | |
void | cdc_list_unique (struct cdc_list *l) |
Removes all consecutive duplicate elements from the container. Only the first element in each group of equal elements is left. More... | |
void | cdc_list_punique (struct cdc_list *l, cdc_binary_pred_fn_t pred) |
Removes all consecutive duplicate elements from the container. Only the first element in each group of equal elements is left. More... | |
void | cdc_list_sort (struct cdc_list *l) |
Sorts elements in ascending order. More... | |
void | cdc_list_csort (struct cdc_list *l, cdc_binary_pred_fn_t compare) |
Sorts elements in ascending order. More... | |
void | cdc_list_foreach (struct cdc_list *l, void(*cb)(void *)) |
A function |cb| is applied to each item of the list. More... | |
void cdc_list_splice | ( | struct cdc_list_iter * | position, |
struct cdc_list_iter * | first, | ||
struct cdc_list_iter * | last | ||
) |
Transfers elements from one container, iterators (first, last] to another container at position before iterator position.
[in] | position | - iterator before which the content will be inserted |
[in] | first,last | - range of elements to transfer from other |
void cdc_list_ssplice | ( | struct cdc_list_iter * | position, |
struct cdc_list_iter * | first | ||
) |
Transfers elements from one container, iterators (first, end] to another container at position before iterator position.
[in] | position | - iterator before which the content will be inserted |
[in] | first | - beginning of the range from which elements will be transferred |
void cdc_list_lsplice | ( | struct cdc_list_iter * | position, |
struct cdc_list * | other | ||
) |
Transfers all elements from container other to another container at position before iterator position.
[in] | position | - iterator before which the content will be inserted |
void cdc_list_cmerge | ( | struct cdc_list * | l, |
struct cdc_list * | other, | ||
cdc_binary_pred_fn_t | compare | ||
) |
void cdc_list_erase_if | ( | struct cdc_list * | l, |
cdc_unary_pred_fn_t | pred | ||
) |
Removes from the container all elements for which predicate pred returns true.
[in] | l | - cdc_list |
[in] | pred | - unary predicate which returns true if the element should be removed |
void cdc_list_reverse | ( | struct cdc_list * | l | ) |
Reverses the order of elements in the container.
[in] | l | - cdc_list |
void cdc_list_unique | ( | struct cdc_list * | l | ) |
Removes all consecutive duplicate elements from the container. Only the first element in each group of equal elements is left.
[in] | l | - cdc_list |
void cdc_list_punique | ( | struct cdc_list * | l, |
cdc_binary_pred_fn_t | pred | ||
) |
Removes all consecutive duplicate elements from the container. Only the first element in each group of equal elements is left.
[in] | l | - cdc_list |
[in] | pred | - binary predicate which returns true if the elements should be treated as equal. |
void cdc_list_sort | ( | struct cdc_list * | l | ) |
Sorts elements in ascending order.
[in] | l | - cdc_list |
void cdc_list_csort | ( | struct cdc_list * | l, |
cdc_binary_pred_fn_t | compare | ||
) |
Sorts elements in ascending order.
[in] | l | - cdc_list |
[in] | compare | - comparison function object which returns true if the first argument is less than (i.e. is ordered before) the second. |
void cdc_list_foreach | ( | struct cdc_list * | l, |
void(*)(void *) | cb | ||
) |
A function |cb| is applied to each item of the list.