utils-lists 4.0.0
µOS++ C++ intrusive lists utilities
|
A class for the core of a double linked list (pointers to neighbours). More...
#include <micro-os-plus/utils/lists.h>
Public Types | |
using | is_statically_allocated = std::false_type |
Type indicating that the links node is not statically allocated. | |
Public Member Functions | |
constexpr | double_list_links () |
Construct a list node (initialise the pointers). | |
constexpr | ~double_list_links () |
Destruct the node. | |
constexpr void | initialize (void) |
Initialise the node links. | |
void | initialize_once (void) |
Initialize the list only at first run. | |
void | link_next (double_list_links_base *node) |
Link the new node as next. | |
void | link_previous (double_list_links_base *node) |
Link the new node as previous. | |
bool | linked (void) const |
Check if the node is linked to a double list. | |
constexpr double_list_links_base * | next (void) const |
Get the link to the next node. | |
constexpr double_list_links_base * | previous (void) const |
Get the link to the previous node. | |
bool | uninitialized (void) const |
Check if the node is uninitialised. | |
void | unlink (void) |
Remove this node from the list. | |
Protected Attributes | |
double_list_links_base * | next_ |
Pointer to the next node. | |
double_list_links_base * | previous_ |
Pointer to the previous node. | |
A class for the core of a double linked list (pointers to neighbours).
The pair of pointers to the next and previous list elements and the methods to access the pointers are inherited from the base class.
The constructor initialises the pointers to an empty list (both pointers point to the node).
using micro_os_plus::utils::double_list_links::is_statically_allocated = std::false_type |
|
constexpr |
|
constexpr |
|
constexprinherited |
|
inherited |
Initialize the list only at first run.
If the statically allocated list is still in the initial uninitialised state (with both pointers nullptr
), initialise the list to the empty state, with both pointers pointing to itself.
For non-statically initialised lists, this method is ineffective, since the node is always initialised at construct time.
|
inherited |
|
inherited |
|
inherited |
|
constexprinherited |
|
constexprinherited |
|
inherited |
Check if the node is uninitialised.
true | The links are not initialised. |
false | The links are initialised. |
An uninitialized node is a node with the pointers set to nullptr
.
Only statically allocated nodes in the initial state are uninitialized. Regular nodes are always initialised.
|
inherited |
|
protectedinherited |
|
protectedinherited |