Simple C Expat Wrapper (SCEW)
1.1.7
|
SCEW general list implementation. More...
Go to the source code of this file.
Typedefs | |
typedef struct scew_list | scew_list |
This is the type delcaration for SCEW lists. | |
typedef void(* | scew_list_hook )(scew_list *, void *) |
SCEW lists hooks (functions) are used by scew_list_foreach. More... | |
typedef scew_bool(* | scew_cmp_hook )(void const *, void const *) |
SCEW lists comparison hooks are used by scew_list_find_custom. More... | |
Functions | |
SCEW_API scew_list * | scew_list_create (void *data) |
Creates a new list item with the given data. More... | |
SCEW_API void | scew_list_free (scew_list *list) |
Frees all the items from the given list. More... | |
SCEW_API void * | scew_list_data (scew_list *list) |
Returns the data pointer of the given list item. More... | |
SCEW_API unsigned int | scew_list_size (scew_list *list) |
Returns the number of items in the given list. More... | |
SCEW_API scew_list * | scew_list_append (scew_list *list, void *data) |
Creates a new list item with the given data and appends it to list. More... | |
SCEW_API scew_list * | scew_list_prepend (scew_list *list, void *data) |
Creates a new list item with the given data and prepends it to list. More... | |
SCEW_API scew_list * | scew_list_delete (scew_list *list, void *data) |
Deletes the first item pointing to data from the given list. More... | |
SCEW_API scew_list * | scew_list_delete_item (scew_list *list, scew_list *item) |
Deletes the given list item from list. More... | |
SCEW_API scew_list * | scew_list_first (scew_list *list) |
Finds the first item of the given list. More... | |
SCEW_API scew_list * | scew_list_last (scew_list *list) |
Finds the last item of the given list. More... | |
SCEW_API scew_list * | scew_list_next (scew_list *list) |
Obtains the next item of the given list item. More... | |
SCEW_API scew_list * | scew_list_previous (scew_list *list) |
Obtains the previous item of the given list item. More... | |
SCEW_API scew_list * | scew_list_index (scew_list *list, unsigned int index) |
Gets the list item at the given index. More... | |
SCEW_API void | scew_list_foreach (scew_list *list, scew_list_hook hook, void *user_data) |
Traverses all list items and executes the given hook for each item found. More... | |
SCEW_API scew_list * | scew_list_find (scew_list *list, void *data) |
Finds the first list item that contains data. More... | |
SCEW_API scew_list * | scew_list_find_custom (scew_list *list, void const *data, scew_cmp_hook hook) |
Finds the first list item that matches the given predicate, hook. More... | |
SCEW general list implementation.