|
liba 0.1.15
An algorithm library based on C/C++
|
Data Structures | |
| struct | a_slist_node |
| instance structure for singly linked list node More... | |
| struct | a_slist |
| instance structure for singly linked list head More... | |
Macros | |
| #define | A_SLIST_NODE {A_NULL} |
| #define | A_SLIST_INIT(list) |
| #define | a_slist_(_, x) |
| cast a list pointer from another type pointer | |
| #define | a_slist_entry(ptr, type, member) |
| access the struct for this entry | |
| #define | a_slist_entry_next(ptr, type, member) |
| #define | a_slist_foreach(it, ctx) |
| iterate over a list | |
| #define | A_SLIST_FOREACH(it, ctx) |
| #define | a_slist_forsafe(it, at, ctx) |
| iterate over a list safe against removal of list entry | |
| #define | A_SLIST_FORSAFE(it, at, ctx) |
Typedefs | |
| typedef struct a_slist_node | a_slist_node |
| instance structure for singly linked list node | |
| typedef struct a_slist | a_slist |
| instance structure for singly linked list head | |
Functions | |
| void | a_slist_ctor (a_slist *ctx) |
| constructor for singly linked list head | |
| void | a_slist_init (a_slist *ctx) |
| initialize for singly linked list head | |
| void | a_slist_dtor (a_slist *ctx) |
| destructor for singly linked list head | |
| void | a_slist_link (a_slist_node *head, a_slist_node *tail) |
| link head node and tail node | |
| void | a_slist_add (a_slist *ctx, a_slist_node *prev, a_slist_node *node) |
| insert a node to a list | |
| void | a_slist_add_head (a_slist *ctx, a_slist_node *node) |
| insert a node to a list head | |
| void | a_slist_add_tail (a_slist *ctx, a_slist_node *node) |
| insert a node to a list tail | |
| void | a_slist_del (a_slist *ctx, a_slist_node *prev) |
| delete a node from a list | |
| void | a_slist_del_head (a_slist *ctx) |
| delete a node from a list head | |
| void | a_slist_mov (a_slist *ctx, a_slist *to, a_slist_node *at) |
| moving a list to another list | |
| void | a_slist_rot (a_slist *ctx) |
| rotate a node in the list | |
| #define a_slist_ | ( | _, | |
| x ) |
cast a list pointer from another type pointer
| [in] | _ | additional attributes of specified type |
| [in] | x | points to singly linked list node |
| #define a_slist_entry | ( | ptr, | |
| type, | |||
| member ) |
access the struct for this entry
| ptr | the &a_slist_node pointer |
| type | the type of the struct this is embedded in |
| member | the name of the a_slist_node within the struct |
| #define a_slist_entry_next | ( | ptr, | |
| type, | |||
| member ) |
| #define A_SLIST_FOREACH | ( | it, | |
| ctx ) |
| #define a_slist_foreach | ( | it, | |
| ctx ) |
iterate over a list
| it | the &a_slist_node to use as a loop counter |
| ctx | points to singly linked list head |
| #define A_SLIST_FORSAFE | ( | it, | |
| at, | |||
| ctx ) |
| #define a_slist_forsafe | ( | it, | |
| at, | |||
| ctx ) |
iterate over a list safe against removal of list entry
| it | the &a_slist_node to use as a loop counter |
| at | another &a_slist_node to use as temporary storage |
| ctx | points to singly linked list head |
| #define A_SLIST_INIT | ( | list | ) |
| void a_slist_add | ( | a_slist * | ctx, |
| a_slist_node * | prev, | ||
| a_slist_node * | node ) |
insert a node to a list
| [in,out] | ctx | points to singly linked list head |
| [in] | prev | previous singly linked list node |
| [in] | node | a singly linked list node |
| void a_slist_add_head | ( | a_slist * | ctx, |
| a_slist_node * | node ) |
insert a node to a list head
| [in,out] | ctx | points to singly linked list head |
| [in] | node | a singly linked list node |
| void a_slist_add_tail | ( | a_slist * | ctx, |
| a_slist_node * | node ) |
insert a node to a list tail
| [in,out] | ctx | points to singly linked list head |
| [in] | node | a singly linked list node |
| void a_slist_ctor | ( | a_slist * | ctx | ) |
constructor for singly linked list head
| [in,out] | ctx | points to singly linked list head |
| void a_slist_del | ( | a_slist * | ctx, |
| a_slist_node * | prev ) |
delete a node from a list
| [in,out] | ctx | points to singly linked list head |
| [in] | prev | previous singly linked list node |
| void a_slist_del_head | ( | a_slist * | ctx | ) |
delete a node from a list head
| [in,out] | ctx | points to singly linked list head |
| void a_slist_dtor | ( | a_slist * | ctx | ) |
destructor for singly linked list head
| [in,out] | ctx | points to singly linked list head |
| void a_slist_init | ( | a_slist * | ctx | ) |
initialize for singly linked list head
| [in,out] | ctx | points to singly linked list head |
| void a_slist_link | ( | a_slist_node * | head, |
| a_slist_node * | tail ) |
link head node and tail node
| [in,out] | head | the head node of a list |
| [in,out] | tail | the tail node of a list |
| void a_slist_mov | ( | a_slist * | ctx, |
| a_slist * | to, | ||
| a_slist_node * | at ) |
moving a list to another list
| [in] | ctx | points to singly linked list head |
| [in,out] | to | another linked list to be inserted |
| [in] | at | the previous &a_slist_node of the inserted node |
| void a_slist_rot | ( | a_slist * | ctx | ) |
rotate a node in the list
| [in,out] | ctx | points to singly linked list head |