theCore C++ embedded framework
ecl::list_node Class Reference

Intrusive, double-linked, circular list node. More...

#include </home/travis/build/forGGe/theCore/lib/containers/export/ecl/list.hpp>

Public Member Functions

 list_node ()
 Constructs emtpy list node. More...
 
 ~list_node ()
 Destructs list node, unlinking itself from any list. More...
 
void add_after (list_node &node)
 Adds a node after this node. More...
 
void add_before (list_node &node)
 Adds a node before this node. More...
 
void unlink ()
 Unlinks this node from a list. More...
 
bool linked () const
 Checks if node is connected to any other node. More...
 
list_nodenext () const
 Returns a pointer to a next list node. More...
 
list_nodeprev () const
 Returns a pointer to a previous list node. More...
 
 list_node (const list_node &)=delete
 
list_nodeoperator= (list_node &)=delete
 

Detailed Description

Intrusive, double-linked, circular list node.

Any class can embed intrusive list node by composing it.

Constructor & Destructor Documentation

◆ list_node() [1/2]

ecl::list_node::list_node ( )
inline

Constructs emtpy list node.

◆ ~list_node()

ecl::list_node::~list_node ( )
inline

Destructs list node, unlinking itself from any list.

Here is the call graph for this function:

◆ list_node() [2/2]

ecl::list_node::list_node ( const list_node )
delete

Member Function Documentation

◆ add_after()

void ecl::list_node::add_after ( list_node node)
inline

Adds a node after this node.

Parameters
[in]nodeNode to add in the list

◆ add_before()

void ecl::list_node::add_before ( list_node node)
inline

Adds a node before this node.

Parameters
[in]nodeNode to add in the list

◆ unlink()

void ecl::list_node::unlink ( )
inline

Unlinks this node from a list.

Has no effect if list is empty.

◆ linked()

bool ecl::list_node::linked ( ) const
inline

Checks if node is connected to any other node.

◆ next()

list_node * ecl::list_node::next ( ) const
inline

Returns a pointer to a next list node.

◆ prev()

list_node * ecl::list_node::prev ( ) const
inline

Returns a pointer to a previous list node.

◆ operator=()

list_node& ecl::list_node::operator= ( list_node )
delete

The documentation for this class was generated from the following file: