|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
Implements the data structure for handling arrays of enums. More...
Go to the source code of this file.
Functions | |
| void | icalenumarray_add (icalenumarray *array, const icalenumarray_element *elem) |
| Appends an element to the array, omitting duplicates. | |
| void | icalenumarray_append (icalenumarray *array, const icalenumarray_element *elem) |
| Appends an element to the array. | |
| icalenumarray * | icalenumarray_clone (icalenumarray *array) |
| Clones the array and all its elements. | |
| const icalenumarray_element * | icalenumarray_element_at (icalenumarray *array, size_t position) |
| Accesses an element stored in the array. | |
| size_t | icalenumarray_find (icalenumarray *array, const icalenumarray_element *needle) |
| Finds an element in the array. | |
| void | icalenumarray_free (icalenumarray *array) |
| Frees this array's memory and all its elements. | |
| void | icalenumarray_remove (icalenumarray *array, const icalenumarray_element *del) |
| Removes all occurrences of an element. | |
| void | icalenumarray_remove_element_at (icalenumarray *array, size_t position) |
| Removes the element at an array position. | |
| size_t | icalenumarray_size (const icalenumarray *array) |
| Indicates the count of elements stored in the array. | |
| void | icalenumarray_sort (icalenumarray *array) |
| Sorts the elements in the array in ascending order. | |
Implements the data structure for handling arrays of enums.
Definition in file icalenumarray.c.
| void icalenumarray_add | ( | icalenumarray * | array, |
| const icalenumarray_element * | elem ) |
Appends an element to the array, omitting duplicates.
| array | The array object to which the element append to |
| elem | The element to append |
Appends element elem to array unless a byte-equal string already is present in the array.
Definition at line 93 of file icalenumarray.c.
| void icalenumarray_append | ( | icalenumarray * | array, |
| const icalenumarray_element * | elem ) |
Appends an element to the array.
| array | The array object to which the element append to |
| elem | The element to append |
Appends element elem to array, not checking for duplicates. Use icalenumarray_add() to only add elements that are not present already in the array.
Definition at line 80 of file icalenumarray.c.
| icalenumarray * icalenumarray_clone | ( | icalenumarray * | array | ) |
Clones the array and all its elements.
| array | The array object to clone. |
Creates an independent copy of the array and all its elements.
Definition at line 160 of file icalenumarray.c.
| const icalenumarray_element * icalenumarray_element_at | ( | icalenumarray * | array, |
| size_t | position ) |
Accesses an element stored in the array.
| array | The array object in which the element is stored |
| position | The slot position of the element in the array |
Accesses an element by returning a pointer to it, given an array and a valid slot position.
Definition at line 31 of file icalenumarray.c.
| size_t icalenumarray_find | ( | icalenumarray * | array, |
| const icalenumarray_element * | needle ) |
Finds an element in the array.
| array | The array object in which to search for the element |
| needle | The element to search for |
Looks for element needle in the array, comparing the numeric value for equality and the optional xvalue for byte-equality. The position of the first occurrence is returned if the element is found. If the element is not found, then the count of elements in the array is returned.
Definition at line 61 of file icalenumarray.c.
| void icalenumarray_free | ( | icalenumarray * | array | ) |
Frees this array's memory and all its elements.
| array | The array object to free |
Frees the array.
Definition at line 137 of file icalenumarray.c.
| void icalenumarray_remove | ( | icalenumarray * | array, |
| const icalenumarray_element * | del ) |
Removes all occurrences of an element.
| array | The array object from which to remove the element |
| del | The element to remove from the array |
Removes all occurrences of the element del from array.
Definition at line 117 of file icalenumarray.c.
| void icalenumarray_remove_element_at | ( | icalenumarray * | array, |
| size_t | position ) |
Removes the element at an array position.
| array | The array object from which to remove the element |
| position | The array position of the element to remove |
Removes the element at position in the array.
Definition at line 104 of file icalenumarray.c.
| size_t icalenumarray_size | ( | const icalenumarray * | array | ) |
Indicates the count of elements stored in the array.
| array | The array object in which the element is stored |
Returns the count of elements stored in the array.
Definition at line 23 of file icalenumarray.c.
| void icalenumarray_sort | ( | icalenumarray * | array | ) |
Sorts the elements in the array in ascending order.
| array | The array object to sort. |
Sorts the array such that all element elements occur in ascending order, comparing the elements as bytes.
Definition at line 151 of file icalenumarray.c.