A set of link structures designed to be used within containers such as etl::intrusive_list.
more than one intrusive container.
permutation of pointer and reference parameters, though reference parameters offer the best performance.
For bidirectional links, unlinking a node will automatically adjust the links of the surrounding nodes at the same level.
const size_t ID_ A unique id for this link level.
enum ID The unique id for this link level.
forward_link<ID>* etl_next A pointer to the next forward link at this level.
clear() Clears the pointers to nullptr.
void etl::link<type>(lhs, rhs) Links lhs to rhs.
void etl::unlink_after(node) Unlinks the node after node.
void etl::unlink_after(before, last) Unlinks the nodes after before up to and including last.
The range remain linked to each other.
bidirectional_link<ID>* etl_previous A pointer to the previous bidirectional link at this level.
bidirectional_link<ID>* etl_next A pointer to the next bidirectional link at this level.
Link lhs to rhs and rhs to what lhs pointed to. If lhs is not nullptr then it must be initialised.
Link lhs to the range first, last and last to what lhs pointed to. If lhs is not nullptr then it must be initialised.
Unlink the specified node. Elements either side are joined.
Unlinks the range of nodes from first to last inclusive.
The range first/last remain linked to each other.
tree_link<ID>* etl_parent A pointer to the parent tree link at this level.
tree_link<ID>* etl_left A pointer to the left tree link at this level.
tree_link<ID>* etl_right A pointer to the right tree link at this level.
void etl::link_left<type>(parent, leaf) Links leaf to the left of parent.
void etl::link_right<type>(parent, leaf) Links leaf to the right of parent.
void etl::link_rotate_left<type>(parent, leaf) Rotates the link left making leaf the new parent.
void etl::link_rotate_right<type>(parent, leaf) Rotates the link right making leaf the new parent.
void etl::link_rotate<type>(parent, leaf) Rotates the link left or right making leaf the new parent.
Chooses left or right rotate depending on the leaf connection.
A simple two level intrusive list.
// Set the first and last nodes links to nullptr.