liba 0.1.15
An algorithm library based on C/C++
|
Data Structures | |
struct | a_list |
instance structure for circular doubly linked list More... | |
Macros | |
#define | A_LIST_INIT(node) |
#define | a_list_(_, x) |
cast a list pointer from another type pointer | |
#define | a_list_entry(ptr, type, member) |
access the struct for this entry | |
#define | a_list_entry_next(ptr, type, member) |
#define | a_list_entry_prev(ptr, type, member) |
#define | a_list_foreach_(it, ctx, next) |
iterate over a list | |
#define | a_list_foreach_next(it, ctx) |
#define | a_list_foreach_prev(it, ctx) |
#define | a_list_forsafe_(it, at, ctx, next) |
iterate over a list safe against removal of list entry | |
#define | a_list_forsafe_next(it, at, ctx) |
#define | a_list_forsafe_prev(it, at, ctx) |
Typedefs | |
typedef struct a_list | a_list |
instance structure for circular doubly linked list | |
Functions | |
void | a_list_ctor (a_list *ctx) |
constructor for circular doubly linked list | |
void | a_list_init (a_list *ctx) |
initialize for circular doubly linked list | |
void | a_list_dtor (a_list *ctx) |
destructor for circular doubly linked list | |
void | a_list_link (a_list *head, a_list *tail) |
link head node and tail node | |
void | a_list_loop (a_list *head, a_list *tail) |
loop head node to tail node | |
void | a_list_add_ (a_list *head1, a_list *tail1, a_list *head2, a_list *tail2) |
connect list1 and list2 | |
void | a_list_add_node (a_list *head, a_list *tail, a_list *node) |
insert a node to a list | |
void | a_list_add_next (a_list *ctx, a_list *node) |
append a node to a list forward | |
void | a_list_add_prev (a_list *ctx, a_list *node) |
append a node to a list backward | |
void | a_list_del_ (a_list const *head, a_list const *tail) |
delete a section of a list | |
void | a_list_del_node (a_list const *node) |
delete a node from a list | |
void | a_list_del_next (a_list const *node) |
remove a node from a list forward | |
void | a_list_del_prev (a_list const *node) |
remove a node from a list backward | |
void | a_list_set_ (a_list const *head1, a_list const *tail1, a_list *head2, a_list *tail2) |
modify a section of a list | |
void | a_list_set_node (a_list const *ctx, a_list *rhs) |
modify a node of a list | |
void | a_list_mov_next (a_list *ctx, a_list const *rhs) |
moving a list from another list forward | |
void | a_list_mov_prev (a_list *ctx, a_list const *rhs) |
moving a list from another list backward | |
void | a_list_rot_next (a_list *ctx) |
rotate a node in the list backward | |
void | a_list_rot_prev (a_list *ctx) |
rotate a node in the list forward | |
void | a_list_swap_ (a_list *head1, a_list *tail1, a_list *head2, a_list *tail2) |
swap a section of one list and a section of another list | |
void | a_list_swap_node (a_list *lhs, a_list *rhs) |
swap the node lhs and the node rhs | |
#define a_list_ | ( | _, | |
x ) |
cast a list pointer from another type pointer
[in] | _ | additional attributes of specified type |
[in] | x | points to circular doubly linked list |
#define a_list_entry | ( | ptr, | |
type, | |||
member ) |
access the struct for this entry
#define a_list_entry_next | ( | ptr, | |
type, | |||
member ) |
#define a_list_entry_prev | ( | ptr, | |
type, | |||
member ) |
#define a_list_foreach_ | ( | it, | |
ctx, | |||
next ) |
#define a_list_foreach_next | ( | it, | |
ctx ) |
#define a_list_foreach_prev | ( | it, | |
ctx ) |
#define a_list_forsafe_ | ( | it, | |
at, | |||
ctx, | |||
next ) |
iterate over a list safe against removal of list entry
#define a_list_forsafe_next | ( | it, | |
at, | |||
ctx ) |
#define a_list_forsafe_prev | ( | it, | |
at, | |||
ctx ) |
#define A_LIST_INIT | ( | node | ) |
connect list1 and list2
[in,out] | head1 | the head node of the list1 |
[in,out] | tail1 | the tail node of the list1 |
[in,out] | head2 | the head node of the list2 |
[in,out] | tail2 | the tail node of the list2 |
append a node to a list forward
[in,out] | ctx | points to circular doubly linked list |
[in] | node | a circular doubly linked list node |
insert a node to a list
[in,out] | head | the head node of a list |
[in,out] | tail | the tail node of a list |
[in] | node | a circular doubly linked list node |
append a node to a list backward
[in,out] | ctx | points to circular doubly linked list |
[in] | node | a circular doubly linked list node |
void a_list_ctor | ( | a_list * | ctx | ) |
constructor for circular doubly linked list
[in,out] | ctx | points to circular doubly linked list |
delete a section of a list
[in] | head | the head node of a list |
[in] | tail | the tail node of a list |
void a_list_del_next | ( | a_list const * | node | ) |
remove a node from a list forward
[in] | node | a circular doubly linked list node |
void a_list_del_node | ( | a_list const * | node | ) |
delete a node from a list
[in] | node | a circular doubly linked list node |
void a_list_del_prev | ( | a_list const * | node | ) |
remove a node from a list backward
[in] | node | a circular doubly linked list node |
void a_list_dtor | ( | a_list * | ctx | ) |
destructor for circular doubly linked list
[in,out] | ctx | points to circular doubly linked list |
void a_list_init | ( | a_list * | ctx | ) |
initialize for circular doubly linked list
[in,out] | ctx | points to circular doubly linked list |
link head node and tail node
[in,out] | head | the head node of a list |
[in,out] | tail | the tail node of a list |
loop head node to tail node
[in,out] | head | the head node of a list |
[in,out] | tail | the tail node of a list |
moving a list from another list forward
[in,out] | ctx | points to circular doubly linked list |
[in] | rhs | another circular doubly linked list |
moving a list from another list backward
[in,out] | ctx | points to circular doubly linked list |
[in] | rhs | another circular doubly linked list |
void a_list_rot_next | ( | a_list * | ctx | ) |
rotate a node in the list backward
[in,out] | ctx | points to circular doubly linked list |
void a_list_rot_prev | ( | a_list * | ctx | ) |
rotate a node in the list forward
[in,out] | ctx | points to circular doubly linked list |
modify a section of a list
[in] | head1 | the head node of the list1 |
[in] | tail1 | the tail node of the list1 |
[in,out] | head2 | the head node of the list2 |
[in,out] | tail2 | the tail node of the list2 |
modify a node of a list
[in] | ctx | the current node |
[in,out] | rhs | the new node |
swap a section of one list and a section of another list
[in,out] | head1 | the head node of the list1 |
[in,out] | tail1 | the tail node of the list1 |
[in,out] | head2 | the head node of the list2 |
[in,out] | tail2 | the tail node of the list2 |