|
Embedded Template Library
1.0
|
#include <iforward_list.h>
Classes | |
| class | const_iterator |
| const_iterator More... | |
| struct | Data_Node |
| The data node element in the forward_list. More... | |
| class | iterator |
| iterator. More... | |
| struct | Node |
Public Types | |
| typedef T | value_type |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef size_t | size_type |
|
typedef std::iterator_traits < iterator >::difference_type | difference_type |
Public Types inherited from etl::forward_list_base | |
| typedef size_t | size_type |
| The type used for determining the size of forward_list. | |
Public Member Functions | |
| iterator | begin () |
| Gets the beginning of the forward_list. | |
| const_iterator | begin () const |
| Gets the beginning of the forward_list. | |
| iterator | before_begin () |
| Gets before the beginning of the forward_list. | |
| const_iterator | before_begin () const |
| Gets before the beginning of the forward_list. | |
| const_iterator | cbegin () const |
| Gets the beginning of the forward_list. | |
| iterator | end () |
| Gets the end of the forward_list. | |
| const_iterator | end () const |
| Gets the end of the forward_list. | |
| const_iterator | cend () const |
| Gets the end of the forward_list. | |
| iforward_list & | operator= (const iforward_list &rhs) |
| Assignment operator. | |
| void | clear () |
| Clears the forward_list. | |
| reference | front () |
| Gets a reference to the first element. | |
| const_reference | front () const |
| Gets a const reference to the first element. | |
| template<typename TIterator > | |
| void | assign (TIterator first, TIterator last) |
| If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws forward_list_iterator if the iterators are reversed. More... | |
| void | assign (size_t n, parameter_t value) |
| Assigns 'n' copies of a value to the forward_list. | |
| void | push_front () |
| Adds a node to the front of the forward_list so a new value can be assigned to front(). | |
| void | push_front (parameter_t value) |
| Pushes a value to the front of the forward_list. | |
| void | pop_front () |
| Removes a value from the front of the forward_list. | |
| void | resize (size_t n) |
| Resizes the forward_list. | |
| void | resize (size_t n, T value) |
| void | reverse () |
| Reverses the forward_list. | |
| iterator | insert_after (iterator position, parameter_t value) |
| Inserts a value to the forward_list after the specified position. | |
| void | insert_after (iterator position, size_t n, parameter_t value) |
| Inserts 'n' copies of a value to the 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 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. | |
| void | unique () |
| template<typename TIsEqual > | |
| void | unique (TIsEqual isEqual) |
| void | sort () |
| template<typename TCompare > | |
| void | sort (TCompare compare) |
| void | remove (parameter_t value) |
| template<typename TPredicate > | |
| void | remove_if (TPredicate predicate) |
| Removes according to a predicate. | |
Public Member Functions inherited from etl::forward_list_base | |
| size_type | size () const |
| Gets the size of the forward_list. | |
| size_type | max_size () const |
| Gets the maximum possible size of the forward_list. | |
| bool | empty () const |
| Checks to see if the forward_list is empty. | |
| bool | full () const |
| Checks to see if the forward_list is full. | |
| size_t | available () const |
Protected Types | |
|
typedef parameter_type< T, is_fundamental< T >::value||is_pointer < T >::value >::type | parameter_t |
Protected Member Functions | |
| iforward_list (Data_Node *node_pool, size_t max_size_) | |
| Constructor. | |
Protected Member Functions inherited from etl::forward_list_base | |
| forward_list_base (size_type max_size) | |
| The constructor that is called from derived classes. | |
Protected Attributes | |
| Node | start_node |
| The node that acts as the forward_list start. | |
| Node | end_node |
| The node that acts as the forward_list end. | |
Protected Attributes inherited from etl::forward_list_base | |
| size_type | next_free |
| The index of the next free node. | |
| size_type | count |
| The number of the used nodes. | |
| const size_type | MAX_SIZE |
| The maximum size of the forward_list. | |
A templated base for all etl::forward_list types.
|
inline |
If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws forward_list_iterator if the iterators are reversed.
Assigns a range of values to the forward_list. If ETL_THROW_EXCEPTIONS is defined throws etl::forward_list_full if the forward_list does not have enough free space.
|
inline |
Resizes the forward_list. If ETL_THROW_EXCEPTIONS is defined, will throw an etl::forward_list_full if n is larger than the maximum size.
|
inline |
Sort using in-place merge sort algorithm. Uses 'less-than operator as the predicate.
|
inline |
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.
|
inline |
Removes all but the first element from every consecutive group of equal elements in the container.
|
inline |
Removes all but the one element from every consecutive group of equal elements in the container.