A base class for a double linked list.
A pair of uninitialised pointers to the next and previous list elements, plus a set of simple (some inlined) methods to access the pointers.
- Note
- Both the regular and the statically allocated list elements are derived from this class.
Definition at line 92 of file lists.h.
constexpr micro_os_plus::utils::double_list_links_base::double_list_links_base |
( |
| ) |
|
|
constexpr |
Construct an uninitialised list node.
This must be an empty constructor, that does not touch the pointers, but leaves them unchanged.
For statically initialised lists, this means a pair of nullptr
pointers.
For regular lists, the constructor of the derived class will handle the initialisations.
- Warning
- Code analysis may trigger:
- Member 'previous_' was not initialized in constructor
- Member 'next_' was not initialized in constructor
Definition at line 53 of file inlines.h.
void micro_os_plus::utils::double_list_links_base::initialize_once |
( |
void | | ) |
|
Initialize the list only at first run.
- Parameters
- None.
- Returns
- Nothing.
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.
- Note
- This method must be manually called for statically allocated list before inserting elements, or performing any other operations.
Definition at line 73 of file lists.cpp.
void micro_os_plus::utils::double_list_links_base::unlink |
( |
void | | ) |
|
Remove this node from the list.
- Returns
- Nothing.
Update both neighbours to point to each other, practically removing the node from the list.
The node is returned to the initial state (empty), with both pointers pointing to itself.
Definition at line 138 of file lists.cpp.