Classes | |
| struct | osip_list_iterator_t |
| struct | osip_list |
| struct | osip_list |
Defines | |
| #define | osip_list_iterator_has_elem(it) ( 0 != (it).actual && (it).pos < (it).li->nb_elt ) |
Typedefs | |
| typedef struct osip_list | osip_list_t |
Functions | |
| int | osip_list_init (osip_list_t *li) |
| void | osip_list_special_free (osip_list_t *li, void *(*free_func)(void *)) |
| int | osip_list_clone (const osip_list_t *src, osip_list_t *dst, int *(*clone_func)(void *, void *)) |
| void | osip_list_ofchar_free (osip_list_t *li) |
| int | osip_list_size (const osip_list_t *li) |
| int | osip_list_eol (const osip_list_t *li, int pos) |
| int | osip_list_add (osip_list_t *li, void *element, int pos) |
| void * | osip_list_get (const osip_list_t *li, int pos) |
| int | osip_list_remove (osip_list_t *li, int pos) |
| void * | osip_list_get_first (osip_list_t *li, osip_list_iterator_t *it) |
| void * | osip_list_get_next (osip_list_iterator_t *it) |
| void * | osip_list_iterator_remove (osip_list_iterator_t *it) |
| #define osip_list_iterator_has_elem | ( | it | ) | ( 0 != (it).actual && (it).pos < (it).li->nb_elt ) |
Check current iterator state.
| it | The element to work on. |
Structure for referencing a list of elements.
| int osip_list_add | ( | osip_list_t * | li, | |
| void * | element, | |||
| int | pos | |||
| ) |
Add an element in a list.
| li | The element to work on. | |
| element | The pointer on the element to add. | |
| pos | the index of the element to add. (or -1 to append the element at the end) |
| int osip_list_clone | ( | const osip_list_t * | src, | |
| osip_list_t * | dst, | |||
| int *(*)(void *, void *) | clone_func | |||
| ) |
Clone a list of element. Each element will be cloned with the method given as the second parameter.
| src | The element to work on. | |
| dst | The element to work on. | |
| clone_func | The method that is able to release one element of the list. |
| int osip_list_eol | ( | const osip_list_t * | li, | |
| int | pos | |||
| ) |
Check if the end of list is detected .
| li | The element to work on. | |
| pos | The index of the possible element. |
| void* osip_list_get | ( | const osip_list_t * | li, | |
| int | pos | |||
| ) |
Get an element from a list.
| li | The element to work on. | |
| pos | the index of the element to get. |
| void* osip_list_get_first | ( | osip_list_t * | li, | |
| osip_list_iterator_t * | it | |||
| ) |
Get first iterator from list.
| li | The element to work on. | |
| it | The iterator. |
| void* osip_list_get_next | ( | osip_list_iterator_t * | it | ) |
GEt next iterator.
| it | The element to work on. |
| int osip_list_init | ( | osip_list_t * | li | ) |
Initialise a osip_list_t element. NOTE: this element MUST be previously allocated with osip_malloc(). The osip_free() call on the list is still automatically done by osip_list_free(). This also means you can't use a static osip_list_t variable if you want to use osip_list_free().
| li | The element to initialise. |
| void* osip_list_iterator_remove | ( | osip_list_iterator_t * | it | ) |
Remove current iterator.
| it | The element to work on. |
| void osip_list_ofchar_free | ( | osip_list_t * | li | ) |
Free a list of element where elements are pointer to 'char'.
| li | The element to work on. |
| int osip_list_remove | ( | osip_list_t * | li, | |
| int | pos | |||
| ) |
Remove an element from a list.
| li | The element to work on. | |
| pos | the index of the element to remove. |
| int osip_list_size | ( | const osip_list_t * | li | ) |
Get the size of a list of element.
| li | The element to work on. |
| void osip_list_special_free | ( | osip_list_t * | li, | |
| void *(*)(void *) | free_func | |||
| ) |
Free a list of element. Each element will be free with the method given as the second parameter.
| li | The element to work on. | |
| free_func | The method that is able to release one element of the list. |
1.5.4