|
GRU - Generic Reusable Utilities
|
Go to the source code of this file.
Data Structures | |
| struct | gru_node_t_ |
Macros | |
| #define | gru_node_get_data_ptr(type, node) (type *) (node)->data |
| #define | gru_node_get_data(type, node) (*(gru_node_get_data_ptr(type, node))) |
Typedefs | |
| typedef struct gru_node_t_ | gru_node_t |
Functions | |
| gru_export gru_node_t * | gru_node_new (const void *ptr) |
| Creates a new node. More... | |
| gru_export void | gru_node_destroy (gru_node_t **node) |
| Destroys a node and sets is address to NULL. More... | |
| gru_export void | gru_node_set_previous (gru_node_t *gru_restrict node, gru_node_t *gru_restrict previous) |
| Sets the previous node for a given node. More... | |
| gru_export void | gru_node_set_next (gru_node_t *gru_restrict node, gru_node_t *gru_restrict next) |
| Sets the next node for a given node. More... | |
| gru_export void | gru_node_reset (gru_node_t *gru_restrict node) |
| Reset the pointers for the node and unassign the next and previous pointers. More... | |
| gru_export void | gru_node_unlink (gru_node_t *gru_restrict node) |
| Unlink a node from it's previous and next node and resets it. More... | |
| #define gru_node_get_data | ( | type, | |
| node | |||
| ) | (*(gru_node_get_data_ptr(type, node))) |
| #define gru_node_get_data_ptr | ( | type, | |
| node | |||
| ) | (type *) (node)->data |
| typedef struct gru_node_t_ gru_node_t |
| gru_export void gru_node_destroy | ( | gru_node_t ** | node | ) |
Destroys a node and sets is address to NULL.
| node | a pointer to the node pointer to destroy |
| gru_export gru_node_t * gru_node_new | ( | const void * | ptr | ) |
Creates a new node.
| ptr | data pointer |
| gru_export void gru_node_reset | ( | gru_node_t *gru_restrict | node | ) |
Reset the pointers for the node and unassign the next and previous pointers.
| node | the node to reset |
| gru_export void gru_node_set_next | ( | gru_node_t *gru_restrict | node, |
| gru_node_t *gru_restrict | next | ||
| ) |
Sets the next node for a given node.
| node | the node to set |
| next | the node to be set as the next to the node |
| gru_export void gru_node_set_previous | ( | gru_node_t *gru_restrict | node, |
| gru_node_t *gru_restrict | previous | ||
| ) |
Sets the previous node for a given node.
| node | the node to set |
| previous | the node to be set as a previous to the node |
| gru_export void gru_node_unlink | ( | gru_node_t *gru_restrict | node | ) |
Unlink a node from it's previous and next node and resets it.
| node | the node to unlink |