|
drizzle
C++ MySQL-protocol-compatible database server
|
#include "univ.i"Go to the source code of this file.
Macros | |
| #define | ut0lst_h |
| #define | UT_LIST_BASE_NODE_T(TYPE) |
| #define | UT_LIST_NODE_T(TYPE) |
| #define | UT_LIST_INIT(BASE) |
| #define | UT_LIST_ADD_FIRST(NAME, BASE, N) |
| #define | UT_LIST_ADD_LAST(NAME, BASE, N) |
| #define | UT_LIST_INSERT_AFTER(NAME, BASE, NODE1, NODE2) |
| #define | UT_LIST_REMOVE_CLEAR(NAME, N) |
| #define | UT_LIST_REMOVE(NAME, BASE, N) |
| #define | UT_LIST_GET_NEXT(NAME, N) |
| #define | UT_LIST_GET_PREV(NAME, N) |
| #define | UT_LIST_GET_LEN(BASE) |
| #define | UT_LIST_GET_FIRST(BASE) |
| #define | UT_LIST_GET_LAST(BASE) |
| #define | UT_LIST_VALIDATE(NAME, TYPE, BASE, ASSERTION) |
| #define UT_LIST_ADD_FIRST | ( | NAME, | |
| BASE, | |||
| N ) |
Adds the node as the first element in a two-way linked list.
| NAME | list name |
| BASE | the base node (not a pointer to it) |
| N | pointer to the node to be added to the list. |
| #define UT_LIST_ADD_LAST | ( | NAME, | |
| BASE, | |||
| N ) |
Adds the node as the last element in a two-way linked list.
| NAME | list name |
| BASE | the base node (not a pointer to it) |
| N | pointer to the node to be added to the list |
| #define UT_LIST_BASE_NODE_T | ( | TYPE | ) |
This macro expands to the unnamed type definition of a struct which acts as the two-way list base node. The base node contains pointers to both ends of the list and a count of nodes in the list (excluding the base node from the count).
| TYPE | the name of the list node data type |
| #define UT_LIST_GET_FIRST | ( | BASE | ) |
| #define UT_LIST_GET_LAST | ( | BASE | ) |
| #define UT_LIST_GET_LEN | ( | BASE | ) |
| #define UT_LIST_GET_NEXT | ( | NAME, | |
| N ) |
| #define UT_LIST_GET_PREV | ( | NAME, | |
| N ) |
| #define UT_LIST_INIT | ( | BASE | ) |
| #define UT_LIST_INSERT_AFTER | ( | NAME, | |
| BASE, | |||
| NODE1, | |||
| NODE2 ) |
Inserts a NODE2 after NODE1 in a list.
| NAME | list name |
| BASE | the base node (not a pointer to it) |
| NODE1 | pointer to node after which NODE2 is inserted |
| NODE2 | pointer to node being inserted after NODE1 |
| #define UT_LIST_NODE_T | ( | TYPE | ) |
This macro expands to the unnamed type definition of a struct which should be embedded in the nodes of the list, the node type must be a struct. This struct contains the pointers to next and previous nodes in the list. The name of the field in the node struct should be the name given to the list.
| TYPE | the list node type name |
| #define UT_LIST_REMOVE | ( | NAME, | |
| BASE, | |||
| N ) |
Removes a node from a two-way linked list.
| NAME | list name |
| BASE | the base node (not a pointer to it) |
| N | pointer to the node to be removed from the list |
| #define UT_LIST_REMOVE_CLEAR | ( | NAME, | |
| N ) |
| #define UT_LIST_VALIDATE | ( | NAME, | |
| TYPE, | |||
| BASE, | |||
| ASSERTION ) |
Checks the consistency of a two-way list.
| NAME | the name of the list |
| TYPE | node type |
| BASE | base node (not a pointer to it) |
| ASSERTION | a condition on ut_list_node_313 |