libannodex
0.7.3
|
#include <annodex/anx_core.h>
Go to the source code of this file.
Data Structures | |
struct | _AnxList |
Typedefs | |
typedef struct _AnxList | AnxList |
A doubly linked list. | |
Functions | |
AnxList * | anx_list_new (void) |
Create a new list. More... | |
AnxList * | anx_list_clone (AnxList *list) |
Clone a list using the default clone function. More... | |
AnxList * | anx_list_clone_with (AnxList *list, AnxCloneFunc clone) |
Clone a list using a custom clone function. More... | |
AnxList * | anx_list_tail (AnxList *list) |
Return the tail element of a list. More... | |
AnxList * | anx_list_prepend (AnxList *list, void *data) |
Prepend a new node to a list containing given data. More... | |
AnxList * | anx_list_append (AnxList *list, void *data) |
Append a new node to a list containing given data. More... | |
AnxList * | anx_list_add_before (AnxList *list, void *data, AnxList *node) |
Add a new node containing given data before a given node. More... | |
AnxList * | anx_list_add_after (AnxList *list, void *data, AnxList *node) |
Add a new node containing given data after a given node. More... | |
AnxList * | anx_list_find (AnxList *list, void *data) |
Find the first node containing given data in a list. More... | |
AnxList * | anx_list_remove (AnxList *list, AnxList *node) |
Remove a node from a list. More... | |
int | anx_list_length (AnxList *list) |
Query the number of items in a list. More... | |
int | anx_list_is_empty (AnxList *list) |
Query if a list is empty, ie. More... | |
int | anx_list_is_singleton (AnxList *list) |
Query if the list is singleton, ie. More... | |
AnxList * | anx_list_free_with (AnxList *list, AnxFreeFunc free_func) |
Free a list, using a given function to free each data element. More... | |
AnxList * | anx_list_free (AnxList *list) |
Free a list, using anx_free() to free each data element. More... | |
A doubly linked list
Add a new node containing given data after a given node.
list | the list |
data | the data element of the newly created node |
node | the node after which to add the newly created node |
Add a new node containing given data before a given node.
list | the list |
data | the data element of the newly created node |
node | the node before which to add the newly created node |
Append a new node to a list containing given data.
list | the list |
data | the data element of the newly created node |
Clone a list using the default clone function.
list | the list to clone |
AnxList* anx_list_clone_with | ( | AnxList * | list, |
AnxCloneFunc | clone | ||
) |
Clone a list using a custom clone function.
list | the list to clone |
clone | the function to use to clone a list item |
Find the first node containing given data in a list.
list | the list |
data | the data element to find |
Free a list, using anx_free() to free each data element.
list | the list |
AnxList* anx_list_free_with | ( | AnxList * | list, |
AnxFreeFunc | free_func | ||
) |
Free a list, using a given function to free each data element.
list | the list |
free_func | a function to free each data element |
int anx_list_is_empty | ( | AnxList * | list | ) |
Query if a list is empty, ie.
contains no items
list | the list |
int anx_list_is_singleton | ( | AnxList * | list | ) |
Query if the list is singleton, ie.
contains exactly one item
list | the list |
int anx_list_length | ( | AnxList * | list | ) |
Query the number of items in a list.
list | the list |
AnxList* anx_list_new | ( | void | ) |
Create a new list.
Prepend a new node to a list containing given data.
list | the list |
data | the data element of the newly created node |
Remove a node from a list.
list | the list |
node | the node to remove |