theCore C++ embedded framework
ecl::list< T, Mptr > Class Template Reference

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

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

Public Member Functions

 list ()
 Constructs a list. More...
 
list_iter< T, Mptr > begin ()
 Returns iterator to first valid element of a list, provided that this node is a head. More...
 
list_iter< T, Mptr > end ()
 Returns iterator to end of the list, provided that this node is a head. More...
 
bool empty () const
 Checks if list is empty. More...
 
void push_back (T &t)
 Push element to the end of a list. More...
 

Detailed Description

template<typename T, list_node T::* Mptr>
class ecl::list< T, Mptr >

Intrusive, double-linked, circular list head.

Any class can use intrusive list node by composing it.

See also
list_node
Template Parameters
TThe type of enclosing class or struct.
MptrThe member-pointer of the list node inside enclosing class.

Constructor & Destructor Documentation

◆ list()

template<typename T , list_node T::* Mptr>
ecl::list< T, Mptr >::list ( )

Constructs a list.

Member Function Documentation

◆ begin()

template<typename T , list_node T::* Mptr>
list_iter< T, Mptr > ecl::list< T, Mptr >::begin ( )

Returns iterator to first valid element of a list, provided that this node is a head.

◆ end()

template<typename T , list_node T::* Mptr>
list_iter< T, Mptr > ecl::list< T, Mptr >::end ( )

Returns iterator to end of the list, provided that this node is a head.

Warning
Dereferencing end iterator is illegal

◆ empty()

template<typename T , list_node T::* Mptr>
bool ecl::list< T, Mptr >::empty ( ) const

Checks if list is empty.

◆ push_back()

template<typename T , list_node T::* Mptr>
void ecl::list< T, Mptr >::push_back ( T &  t)

Push element to the end of a list.


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