Loading...
Searching...
No Matches
etl::list< T, MAX_SIZE_ > Class Template Reference

A templated list implementation that uses a fixed size buffer. More...

`#include <list.h>`

## 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
Public Types inherited from etl::ilist< T >
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 etl::iterator_traits< iterator >::difference_type | difference_type
typedef ETL_OR_STD::reverse_iterator< iterator > | reverse_iterator
typedef ETL_OR_STD::reverse_iterator< const_iterator > | const_reverse_iterator
Public Types inherited from etl::list_base
typedef size_t | size_type
| The type used for determining the size of list.

## Public Member Functions

| ETL_STATIC_ASSERT ((MAX_SIZE_ > 0U), "Zero capacity etl::list is not valid")
| list ()
| Default constructor.
| ~list ()
| Destructor.
| list (size_t initial_size)
| Construct from size.
| list (size_t initial_size, const T &value)
| Construct from size and value.
| list (const list &other)
| Copy constructor.
template<typename TIterator>
| list (TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
| Construct from range.
list & | operator= (const list &rhs)
| Assignment operator.
Public Member Functions inherited from etl::ilist< T >
iterator | begin ()
| Gets the beginning of the list.
const_iterator | begin () const
| Gets the beginning of the list.
iterator | end ()
| Gets the end of the list.
const_iterator | end () const
| Gets the end of the list.
const_iterator | cbegin () const
| Gets the beginning of the list.
const_iterator | cend () const
| Gets the end of the list.
reverse_iterator | rbegin ()
| Gets the reverse beginning of the list.
const_reverse_iterator | rbegin () const
| Gets the reverse beginning of the list.
reverse_iterator | rend ()
| Gets the reverse end of the list.
const_reverse_iterator | rend () const
| Gets the reverse end of the list.
const_reverse_iterator | crbegin () const
| Gets the reverse beginning of the list.
const_reverse_iterator | crend () const
| Gets the reverse end of the list.
reference | front ()
const_reference | front () const
reference | back ()
const_reference | back () const
template<typename TIterator>
void | assign (TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
void | assign (size_t n, const T &value)
| Assigns 'n' copies of a value to the list.
void | push_front (const T &value)
| Pushes a value to the front of the list.
reference | emplace_front ()
| Emplaces a value to the front of the list.
template<typename T1>
reference | emplace_front (const T1 &value1)
| Emplaces a value to the front of the list.
template<typename T1, typename T2>
reference | emplace_front (const T1 &value1, const T2 &value2)
| Emplaces a value to the front of the list.
template<typename T1, typename T2, typename T3>
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3)
| Emplaces a value to the front of the list.
template<typename T1, typename T2, typename T3, typename T4>
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
| Emplaces a value to the front of the list.
void | pop_front ()
| Removes a value from the front of the list.
void | push_back (const T &value)
| Pushes a value to the back of the list.
reference | emplace_back ()
| Emplaces a value to the back of the list.
template<typename T1>
reference | emplace_back (const T1 &value1)
template<typename T1, typename T2>
reference | emplace_back (const T1 &value1, const T2 &value2)
template<typename T1, typename T2, typename T3>
reference | emplace_back (const T1 &value1, const T2 &value2, const T3 &value3)
template<typename T1, typename T2, typename T3, typename T4>
reference | emplace_back (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
void | pop_back ()
| Removes a value from the back of the list.
iterator | insert (const_iterator position, const_reference value)
| Inserts a value to the list at the specified position.
iterator | emplace (const_iterator position)
| Emplaces a value to the list at the specified position.
template<typename T1>
iterator | emplace (const_iterator position, const T1 &value1)
template<typename T1, typename T2>
iterator | emplace (const_iterator position, const T1 &value1, const T2 &value2)
template<typename T1, typename T2, typename T3>
iterator | emplace (const_iterator position, const T1 &value1, const T2 &value2, const T3 &value3)
template<typename T1, typename T2, typename T3, typename T4>
iterator | emplace (const_iterator position, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
void | insert (const_iterator position, size_t n, const_reference value)
| Inserts 'n' copies of a value to the list at the specified position.
template<typename TIterator>
void | insert (const_iterator position, TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
| Inserts a range of values to the list at the specified position.
iterator | erase (const_iterator position)
| Erases the value at the specified position.
iterator | erase (const_iterator first, const_iterator last)
| Erases a range of elements.
void | resize (size_t n)
| Resizes the list.
void | resize (size_t n, const_reference value)
| Resizes the list.
void | clear ()
| Clears the list.
void | remove (const_reference value)
template<typename TPredicate>
void | remove_if (TPredicate predicate)
| Removes according to a predicate.
void | unique ()
template<typename TIsEqual>
void | unique (TIsEqual isEqual)
void | splice (iterator to, ilist &other)
| Splices from another list to this.
void | splice (iterator to, ilist &other, iterator from)
| Splices an element from another list to this.
void | splice (iterator to, ilist &other, iterator first, iterator last)
| Splices a range of elements from another list to this.
void | merge (ilist &other)
| Merge another list into this one. Both lists should be sorted.
template<typename TCompare>
void | merge (ilist &other, TCompare compare)
| Merge another list into this one. Both lists should be sorted.
void | sort ()
template<typename TCompare>
void | sort (TCompare compare)
ilist & | operator= (const ilist &rhs)
| Assignment operator.
Public Member Functions inherited from etl::list_base
bool | has_shared_pool () const
| true if the list has a shared pool.
void | reverse ()
| Reverses the list.
size_type | max_size () const
| Gets the maximum possible size of the list.
size_type | capacity () const
| Gets the maximum possible size of the list.
size_type | size () const
| Gets the size of the list.
bool | empty () const
| Checks to see if the list is empty.
bool | full () const
| Checks to see if the list is full.
size_type | available () const

## Static Public Attributes

static ETL_CONSTANT size_t | MAX_SIZE = MAX_SIZE_

## Additional Inherited Members

Protected Types inherited from etl::ilist< T >
typedef etl::parameter_type< T >::type | parameter_t
Protected Member Functions inherited from etl::ilist< T >
| ilist (bool pool_is_shared_)
| Constructor.
| ilist (etl::ipool &node_pool, size_t max_size_, bool pool_is_shared_)
| Constructor.
void | initialise ()
| Initialise the list.
Protected Member Functions inherited from etl::list_base
bool | is_trivial_list () const
| Is the list a trivial length?
node_t & | get_head ()
| Get the head node.
const node_t & | get_head () const
| Get the head node.
node_t & | get_tail ()
| Get the tail node.
const node_t & | get_tail () const
| Get the tail node.
void | insert_node (node_t &position, node_t &node)
| Insert a node before 'position'.
void | join (node_t &left, node_t &right)
| Join two nodes.
| list_base (bool pool_is_shared_)
| The constructor that is called from derived classes.
| list_base (etl::ipool &node_pool_, size_type max_size_, bool pool_is_shared_)
| The constructor that is called from derived classes.
void | set_node_pool (etl::ipool &node_pool_)
| Set the node pool instance.
etl::ipool * | get_node_pool ()
| Get the node pool instance.
| ~list_base ()
| Destructor.
Protected Attributes inherited from etl::list_base
etl::ipool * | p_node_pool
| The pool of data nodes used in the list.
node_t | terminal_node
| The node that acts as the list start and end.
size_type | MAX_SIZE
| The maximum size of the list.
bool | pool_is_shared
| If true then the pool is shared between lists.
| ETL_DECLARE_DEBUG_COUNT
| Internal debugging.

## Detailed Description

template<typename T, const size_t MAX_SIZE_>
class etl::list< T, MAX_SIZE_ >

A templated list implementation that uses a fixed size buffer.

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

- include/etl/list.h