Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
intrusive_forward_list< TValue, TLink > Class Template Reference
An intrusive forward list. More...
#include <intrusive_forward_list.h>
Inherits etl::intrusive_forward_list_base< TLink >.
Data Structures | |
class | const_iterator |
const_iterator More... | |
class | iterator |
iterator. More... | |
Public Member Functions | |
intrusive_forward_list () | |
Constructor. | |
~intrusive_forward_list () | |
Destructor. | |
template<typename TIterator > | |
intrusive_forward_list (TIterator first, TIterator last) | |
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. | |
template<typename TIsEqual > | |
void | unique (TIsEqual isEqual) |
Removes all but the one element from every consecutive group of equal elements in the container. | |
void | sort () |
Sort using in-place merge sort algorithm. | |
template<typename TCompare > | |
void | sort (TCompare compare) |
Sort using in-place merge sort algorithm. | |
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 (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. | |
void | clear () |
Clears the intrusive_forward_list. | |
template<typename TIterator > | |
void | assign (TIterator first, TIterator last) |
Assigns a range of values to the intrusive_forward_list. | |
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. | |
Protected Member Functions | |
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 | remove_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. | |
Protected Attributes | |
link_type | start_link |
The link that acts as the intrusive_forward_list start. | |
size_t | current_size |
Counts the number of elements in the list. |
Detailed Description
template<typename TValue, typename TLink = etl::forward_link<0>>
class etl::intrusive_forward_list< TValue, TLink >
An intrusive forward list.
- Note:
- TLink must be a base of TValue.
Definition at line 304 of file intrusive_forward_list.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 496 of file intrusive_forward_list.h.
Destructor.
Definition at line 504 of file intrusive_forward_list.h.
intrusive_forward_list | ( | TIterator | first, |
TIterator | last | ||
) |
Constructor from range.
Definition at line 513 of file intrusive_forward_list.h.
Member Function Documentation
void assign | ( | TIterator | first, |
TIterator | last | ||
) | [inherited] |
Assigns a range of values to the intrusive_forward_list.
If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined throws forward_list_iterator if the iterators are reversed.
Definition at line 153 of file intrusive_forward_list.h.
const_iterator before_begin | ( | ) | const |
Gets before the beginning of the intrusive_forward_list.
Definition at line 545 of file intrusive_forward_list.h.
iterator before_begin | ( | ) |
Gets before the beginning of the intrusive_forward_list.
Definition at line 537 of file intrusive_forward_list.h.
const_iterator begin | ( | ) | const |
Gets the beginning of the intrusive_forward_list.
Definition at line 529 of file intrusive_forward_list.h.
iterator begin | ( | ) |
Gets the beginning of the intrusive_forward_list.
Definition at line 521 of file intrusive_forward_list.h.
const_iterator cbegin | ( | ) | const |
Gets the beginning of the intrusive_forward_list.
Definition at line 553 of file intrusive_forward_list.h.
const_iterator cend | ( | ) | const |
Gets the end of the intrusive_forward_list.
Definition at line 577 of file intrusive_forward_list.h.
void clear | ( | ) | [inherited] |
Clears the intrusive_forward_list.
Definition at line 143 of file intrusive_forward_list.h.
bool empty | ( | ) | const [inherited] |
Returns true if the list has no elements.
Definition at line 221 of file intrusive_forward_list.h.
iterator end | ( | ) |
Gets the end of the intrusive_forward_list.
Definition at line 561 of file intrusive_forward_list.h.
const_iterator end | ( | ) | const |
Gets the end of the intrusive_forward_list.
Definition at line 569 of file intrusive_forward_list.h.
Erases the value at the specified position.
Definition at line 624 of file intrusive_forward_list.h.
Erases a range of elements.
Definition at line 643 of file intrusive_forward_list.h.
reference front | ( | ) |
Gets a reference to the first element.
Definition at line 585 of file intrusive_forward_list.h.
const_reference front | ( | ) | const |
Gets a const reference to the first element.
Definition at line 593 of file intrusive_forward_list.h.
link_type& get_head | ( | ) | [protected, inherited] |
Get the head link.
Definition at line 275 of file intrusive_forward_list.h.
const link_type& get_head | ( | ) | const [protected, inherited] |
Get the head link.
Definition at line 283 of file intrusive_forward_list.h.
void initialise | ( | ) | [protected, inherited] |
Initialise the intrusive_forward_list.
Definition at line 291 of file intrusive_forward_list.h.
Inserts a value to the intrusive_forward_list after the specified position.
Definition at line 601 of file intrusive_forward_list.h.
void insert_after | ( | iterator | position, |
TIterator | first, | ||
TIterator | last | ||
) |
Inserts a range of values to the intrusive_forward_list after the specified position.
Definition at line 611 of file intrusive_forward_list.h.
void insert_link_after | ( | link_type & | position, |
link_type & | link | ||
) | [protected, inherited] |
Insert a link.
Definition at line 251 of file intrusive_forward_list.h.
bool is_trivial_list | ( | ) | const [protected, inherited] |
Is the intrusive_forward_list a trivial length?
Definition at line 243 of file intrusive_forward_list.h.
void merge | ( | list_type & | other ) |
Merge another list into this one. Both lists should be sorted.
Definition at line 961 of file intrusive_forward_list.h.
void merge | ( | list_type & | other, |
TCompare | compare | ||
) |
Merge another list into this one. Both lists should be sorted.
Definition at line 970 of file intrusive_forward_list.h.
void pop_front | ( | ) | [inherited] |
Removes a value from the front of the intrusive_forward_list.
Definition at line 185 of file intrusive_forward_list.h.
void push_front | ( | link_type & | value ) | [inherited] |
Pushes a value to the front of the intrusive_forward_list.
Definition at line 177 of file intrusive_forward_list.h.
void remove_if | ( | TPredicate | predicate ) |
Removes according to a predicate.
Definition at line 854 of file intrusive_forward_list.h.
void remove_link_after | ( | link_type & | link ) | [protected, inherited] |
Remove a link.
Definition at line 261 of file intrusive_forward_list.h.
void reverse | ( | ) | [inherited] |
Reverses the intrusive_forward_list.
Definition at line 196 of file intrusive_forward_list.h.
size_t size | ( | ) | const [inherited] |
Returns the number of elements.
Definition at line 229 of file intrusive_forward_list.h.
void sort | ( | TCompare | compare ) |
Sort using in-place merge sort algorithm.
Uses a supplied predicate function or functor. This is not my algorithm. I got it off the web somewhere.
Definition at line 717 of file intrusive_forward_list.h.
void sort | ( | ) |
Sort using in-place merge sort algorithm.
Definition at line 706 of file intrusive_forward_list.h.
void splice | ( | iterator | position, |
etl::intrusive_forward_list< TValue, TLink > & | other, | ||
iterator | isource | ||
) |
Splice an element from another list into this one.
Definition at line 911 of file intrusive_forward_list.h.
void splice_after | ( | iterator | position, |
etl::intrusive_forward_list< TValue, TLink > & | other | ||
) |
Splice another list into this one.
Definition at line 876 of file intrusive_forward_list.h.
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.
Definition at line 928 of file intrusive_forward_list.h.
void unique | ( | TIsEqual | isEqual ) |
Removes all but the one element from every consecutive group of equal elements in the container.
Definition at line 676 of file intrusive_forward_list.h.
Field Documentation
size_t current_size [protected, inherited] |
Counts the number of elements in the list.
Definition at line 238 of file intrusive_forward_list.h.
link_type start_link [protected, inherited] |
The link that acts as the intrusive_forward_list start.
Definition at line 236 of file intrusive_forward_list.h.
Generated on Tue Jul 12 2022 14:05:50 by
