Embedded Template Library 1.0
|
Classes | |
class | etl::forward_list_no_pool |
class | etl::list_exception |
class | etl::list_full |
class | etl::list_empty |
class | etl::list_iterator |
class | etl::list_unsorted |
class | etl::list_no_pool |
class | etl::list_base |
class | etl::ilist< T > |
class | etl::optional_exception |
class | etl::optional_invalid |
A linked list with the capacity defined at compile time.
class etl::forward_list_no_pool |
Unsorted exception for the list.
Public Member Functions | |
forward_list_no_pool (string_type file_name_, numeric_type line_number_) | |
![]() | |
forward_list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_exception |
Exception for the list.
Public Member Functions | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_full |
Full exception for the list.
Public Member Functions | |
list_full (string_type file_name_, numeric_type line_number_) | |
![]() | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_empty |
Empty exception for the list.
Public Member Functions | |
list_empty (string_type file_name_, numeric_type line_number_) | |
![]() | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_iterator |
Iterator exception for the list.
Public Member Functions | |
list_iterator (string_type file_name_, numeric_type line_number_) | |
![]() | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_unsorted |
Unsorted exception for the list.
Public Member Functions | |
list_unsorted (string_type file_name_, numeric_type line_number_) | |
![]() | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_no_pool |
Unsorted exception for the list.
Public Member Functions | |
list_no_pool (string_type file_name_, numeric_type line_number_) | |
![]() | |
list_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::list_base |
The base class for all lists.
Public Types | |
typedef size_t | size_type |
The type used for determining the size of list. | |
Public Member Functions | |
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 |
Protected Member Functions | |
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 | |
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. | |
|
inline |
Returns the remaining capacity.
class etl::ilist |
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 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 |
![]() | |
typedef size_t | size_type |
The type used for determining the size of list. | |
Public Member Functions | |
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 () |
Gets a reference to the first element. | |
const_reference | front () const |
Gets a const reference to the first element. | |
reference | back () |
Gets a reference to the last element. | |
const_reference | back () const |
Gets a reference to the last element. | |
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. | |
![]() | |
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 |
Protected Types | |
typedef etl::parameter_type< T >::type | parameter_t |
Protected Member Functions | |
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. | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
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. | |
|
inline |
Assigns a range of values to the list. If asserts or exceptions are enabled throws etl::list_full if the list does not have enough free space. If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined throws list_iterator if the iterators are reversed.
|
inline |
Sort using in-place merge sort algorithm. Uses 'less-than operator as the predicate.
|
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.
|
inline |
Removes all but the first element from every consecutive group of equal elements in the container.
class etl::optional_exception |
Exception for optional.
Public Member Functions | |
optional_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::optional_invalid |
Invalid exception for optional.
Public Member Functions | |
optional_invalid (string_type file_name_, numeric_type line_number_) | |
![]() | |
optional_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |