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

#include <intrusive_forward_list.h>

Classes

class  const_iterator
 const_iterator More...
 
class  iterator
 iterator. More...
 

Public Types

typedef etl::intrusive_forward_list_base< TLink >::link_type link_type
 
typedef TValue value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef size_t size_type
 
typedef intrusive_forward_list< TValue, TLinklist_type
 
typedef TValue node_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::intrusive_forward_list_base< TLink >
typedef TLink link_type
 

Public Member Functions

 intrusive_forward_list ()
 Constructor.
 
 ~intrusive_forward_list ()
 Destructor.
 
template<typename TIterator >
 intrusive_forward_list (TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
 Constructor from range.
 
iterator begin ()
 Gets the beginning of the intrusive_forward_list.
 
const_iterator begin () const
 Gets the beginning of the intrusive_forward_list.
 
iterator before_begin ()
 Gets before the beginning of the intrusive_forward_list.
 
const_iterator before_begin () const
 Gets before the beginning of the intrusive_forward_list.
 
const_iterator cbegin () const
 Gets the beginning of the intrusive_forward_list.
 
iterator end ()
 Gets the end of the intrusive_forward_list.
 
const_iterator end () const
 Gets the end of the intrusive_forward_list.
 
const_iterator cend () const
 Gets the end of the intrusive_forward_list.
 
reference front ()
 Gets a reference to the first element.
 
const_reference front () const
 Gets a const reference to the first element.
 
iterator insert_after (iterator position, value_type &value)
 Inserts a value to the intrusive_forward_list after the specified position.
 
template<typename TIterator >
void insert_after (iterator position, TIterator first, TIterator last)
 Inserts a range of values to the intrusive_forward_list after the specified position.
 
iterator erase_after (iterator position)
 Erases the value at the specified position.
 
iterator erase_after (iterator first, iterator last)
 Erases a range of elements.
 
node_typeerase (node_type &node)
 Erases the specified node.
 
template<typename TIsEqual >
void unique (TIsEqual isEqual)
 
void sort ()
 Sort using in-place merge sort algorithm.
 
template<typename TCompare >
void sort (TCompare compare)
 
void remove (const_reference value)
 
template<typename TPredicate >
void remove_if (TPredicate predicate)
 Removes according to a predicate.
 
void splice_after (iterator position, etl::intrusive_forward_list< TValue, TLink > &other)
 Splice another list into this one.
 
void splice_after (iterator position, etl::intrusive_forward_list< TValue, TLink > &other, iterator isource)
 Splice an element from another list into this one.
 
void splice_after (iterator position, etl::intrusive_forward_list< TValue, TLink > &other, iterator begin_, iterator end_)
 Splice a range of elements from another list into this one.
 
void merge (list_type &other)
 Merge another list into this one. Both lists should be sorted.
 
template<typename TCompare >
void merge (list_type &other, TCompare compare)
 Merge another list into this one. Both lists should be sorted.
 
- Public Member Functions inherited from etl::intrusive_forward_list_base< TLink >
void clear ()
 Clears the intrusive_forward_list.
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void push_front (link_type &value)
 Pushes a value to the front of the intrusive_forward_list.
 
void pop_front ()
 Removes a value from the front of the intrusive_forward_list.
 
void reverse ()
 Reverses the intrusive_forward_list.
 
bool empty () const
 Returns true if the list has no elements.
 
size_t size () const
 Returns the number of elements.
 

Additional Inherited Members

- Protected Member Functions inherited from etl::intrusive_forward_list_base< TLink >
 intrusive_forward_list_base ()
 Constructor.
 
 ~intrusive_forward_list_base ()
 Destructor.
 
bool is_trivial_list () const
 Is the intrusive_forward_list a trivial length?
 
void insert_link_after (link_type &position, link_type &link)
 Insert a link.
 
void disconnect_link_after (link_type &link)
 Remove a link.
 
link_type * get_head ()
 Get the head link.
 
const link_type * get_head () const
 Get the head link.
 
void initialise ()
 Initialise the intrusive_forward_list.
 
link_type * is_link_in_list (link_type &search_link)
 
link_type * remove_link (link_type &link)
 
link_type * remove_link_range_after (link_type *p_first, link_type *p_last)
 Remove a range of elements.
 
- Protected Attributes inherited from etl::intrusive_forward_list_base< TLink >
link_type start
 The link pointer that acts as the intrusive_forward_list start.
 
size_t current_size
 Counts the number of elements in the list.
 
- Static Protected Attributes inherited from etl::intrusive_forward_list_base< TLink >
static link_type terminator
 The link that acts as the intrusive_forward_list terminator.
 

Detailed Description

template<typename TValue, typename TLink>
class etl::intrusive_forward_list< TValue, TLink >

An intrusive forward list.

Note
TLink must be a base of TValue.

Member Function Documentation

◆ sort()

template<typename TValue , typename TLink >
template<typename TCompare >
void etl::intrusive_forward_list< TValue, TLink >::sort ( TCompare  compare)
inline

Stable sort using in-place merge sort algorithm. Copyright 2001 Simon Tatham.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

◆ unique()

template<typename TValue , typename TLink >
template<typename TIsEqual >
void etl::intrusive_forward_list< TValue, TLink >::unique ( TIsEqual  isEqual)
inline

Removes all but the one element from every consecutive group of equal elements in the container.


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