Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::intrusive_list_base< TLink > Class Template Reference

#include <intrusive_list.h>

Public Types

typedef TLink link_type
 

Public Member Functions

template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void push_front (link_type &value)
 Pushes a value to the front of the intrusive_list.
 
void pop_front ()
 Removes a value from the front of the intrusive_list.
 
void push_back (link_type &value)
 Pushes a value to the back of the intrusive_list.
 
void pop_back ()
 Removes a value from the back of the intrusive_list.
 
void clear ()
 Clears the intrusive_list.
 
void reverse ()
 Reverses the list.
 
bool empty () const
 Returns true if the list has no elements.
 
size_t size () const
 Returns the number of elements.
 

Protected Member Functions

 ~intrusive_list_base ()
 Destructor.
 
bool is_trivial_list () const
 Is the intrusive_list a trivial length?
 
void insert_link (link_type &previous, link_type &new_link)
 Insert a link.
 
void insert_link (link_type *previous, link_type &new_link)
 Insert a link.
 
void insert_link (link_type &previous, link_type *new_link)
 Insert a link.
 
void insert_link (link_type *previous, link_type *new_link)
 Insert a link.
 
void disconnect_link (link_type &link)
 Remove a link.
 
void disconnect_link (link_type *link)
 Remove a link.
 
link_typeget_head ()
 Get the head link.
 
const link_typeget_head () const
 Get the head link.
 
link_typeget_tail ()
 Get the tail link.
 
const link_typeget_tail () const
 Get the tail link.
 
void initialise ()
 Initialise the intrusive_list.
 
bool is_link_in_list (link_type &search_link) const
 Tests if the link is in this list.
 
link_typeremove_link (link_type &link)
 
link_typeremove_link_range (link_type *p_first, link_type *p_last)
 Removes a range of links.
 

Protected Attributes

link_type terminal_link
 The link that acts as the intrusive_list start & end.
 
size_t current_size
 Counts the number of elements in the list.
 

Detailed Description

template<typename TLink>
class etl::intrusive_list_base< TLink >

Base for intrusive list.

Member Function Documentation

◆ assign()

template<typename TLink >
template<typename TIterator >
void etl::intrusive_list_base< TLink >::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns a range of values to the intrusive_list. If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined emits a intrusive_list_iterator_exception if the iterators are reversed.

◆ remove_link()

template<typename TLink >
link_type * etl::intrusive_list_base< TLink >::remove_link ( link_type link)
inlineprotected

Remove the specified node from the list. Returns ETL_NULLPTR if the link was not in this list or was the last in the list.


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