Embedded Template Library 1.0
|
Classes | |
class | etl::deque_exception |
class | etl::deque_full |
class | etl::deque_empty |
class | etl::deque_out_of_bounds |
class | etl::deque_base |
class | etl::ideque< T > |
class | etl::deque< T, MAX_SIZE_ > |
Functions | |
template<typename T > | |
bool | etl::operator== (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
Template deduction guides. | |
template<typename T > | |
bool | etl::operator!= (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
template<typename T > | |
bool | etl::operator< (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
template<typename T > | |
bool | etl::operator<= (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
template<typename T > | |
bool | etl::operator> (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
template<typename T > | |
bool | etl::operator>= (const etl::ideque< T > &lhs, const etl::ideque< T > &rhs) |
A double ended queue with the capacity defined at compile time.
class etl::deque_exception |
Exception base for deques
Public Member Functions | |
deque_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::deque_full |
Deque full exception.
Public Member Functions | |
deque_full (string_type file_name_, numeric_type line_number_) | |
![]() | |
deque_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::deque_empty |
Deque empty exception.
Public Member Functions | |
deque_empty (string_type file_name_, numeric_type line_number_) | |
![]() | |
deque_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::deque_out_of_bounds |
Deque out of bounds exception.
Public Member Functions | |
deque_out_of_bounds (string_type file_name_, numeric_type line_number_) | |
![]() | |
deque_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::deque_base |
The base class for all templated deque types.
Public Types | |
typedef size_t | size_type |
Public Member Functions | |
size_type | size () const |
bool | empty () const |
bool | full () const |
size_type | max_size () const |
size_type | capacity () const |
size_t | available () const |
Protected Member Functions | |
deque_base (size_t max_size_, size_t buffer_size_) | |
Constructor. | |
~deque_base () | |
Destructor. | |
Protected Attributes | |
size_type | current_size |
The current number of elements in the deque. | |
const size_type | CAPACITY |
The maximum number of elements in the deque. | |
const size_type | BUFFER_SIZE |
The number of elements in the buffer. | |
ETL_DECLARE_DEBUG_COUNT | |
Internal debugging. | |
|
inline |
Returns the remaining capacity.
|
inline |
Returns the maximum possible size of the deque.
|
inline |
Checks the 'empty' state of the deque.
|
inline |
Checks the 'full' state of the deque.
|
inline |
Returns the maximum possible size of the deque.
|
inline |
Gets the current size of the deque.
class etl::ideque |
The base class for all etl::deque classes.
T | The type of values this deque should hold. |
Public Types | |
typedef T | value_type |
typedef size_t | size_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef etl::iterator_traits< pointer >::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 |
Public Member Functions | |
template<typename TIterator > | |
etl::enable_if<!etl::is_integral< TIterator >::value, void >::type | assign (TIterator range_begin, TIterator range_end) |
Assigns a range to the deque. | |
void | assign (size_type n, const value_type &value) |
reference | at (size_t index) |
const_reference | at (size_t index) const |
reference | operator[] (size_t index) |
const_reference | operator[] (size_t index) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
iterator | begin () |
Gets an iterator to the beginning of the deque. | |
const_iterator | begin () const |
Gets a const iterator to the beginning of the deque. | |
const_iterator | cbegin () const |
Gets a const iterator to the beginning of the deque. | |
iterator | end () |
Gets an iterator to the end of the deque. | |
const_iterator | end () const |
Gets a const iterator to the end of the deque. | |
const_iterator | cend () const |
Gets a const iterator to the end of the deque. | |
reverse_iterator | rbegin () |
Gets a reverse iterator to the end of the deque. | |
const_reverse_iterator | rbegin () const |
Gets a const reverse iterator to the end of the deque. | |
const_reverse_iterator | crbegin () const |
Gets a const reverse iterator to the end of the deque. | |
reverse_iterator | rend () |
Gets a reverse iterator to the beginning of the deque. | |
const_reverse_iterator | rend () const |
Gets a const reverse iterator to the beginning of the deque. | |
const_reverse_iterator | crend () const |
Gets a const reverse iterator to the beginning of the deque. | |
void | clear () |
Clears the deque. | |
void | fill (const T &value) |
Fills the deque. | |
iterator | insert (const_iterator insert_position, const value_type &value) |
template<typename T1 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1) |
template<typename T1 , typename T2 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
iterator | insert (const_iterator insert_position, size_type n, const value_type &value) |
template<typename TIterator > | |
enable_if<!etl::is_integral< TIterator >::value, iterator >::type | insert (const_iterator insert_position, TIterator range_begin, TIterator range_end) |
iterator | erase (const_iterator erase_position) |
iterator | erase (const_iterator range_begin, const_iterator range_end) |
void | push_back (const_reference item) |
reference | emplace_back () |
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 the oldest item from the deque. | |
void | push_front (const_reference item) |
reference | emplace_front () |
template<typename T1 > | |
reference | emplace_front (const T1 &value1) |
template<typename T1 , typename T2 > | |
reference | emplace_front (const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
void | pop_front () |
Removes the oldest item from the deque. | |
void | resize (size_t new_size, const value_type &value=value_type()) |
ideque & | operator= (const ideque &rhs) |
Assignment operator. | |
![]() | |
size_type | size () const |
bool | empty () const |
bool | full () const |
size_type | max_size () const |
size_type | capacity () const |
size_t | available () const |
Protected Member Functions | |
ideque (pointer p_buffer_, size_t max_size_, size_t buffer_size_) | |
Constructor. | |
void | initialise () |
Initialise the deque. | |
void | repair_buffer (pointer p_buffer_) |
Fix the internal pointers after a low level memory copy. | |
~ideque () | |
Destructor. | |
![]() | |
deque_base (size_t max_size_, size_t buffer_size_) | |
Constructor. | |
~deque_base () | |
Destructor. | |
Protected Attributes | |
iterator | _begin |
iterator | _end |
Iterator to the _begin item in the deque. | |
pointer | p_buffer |
Iterator to the _end item in the deque. | |
![]() | |
size_type | current_size |
The current number of elements in the deque. | |
const size_type | CAPACITY |
The maximum number of elements in the deque. | |
const size_type | BUFFER_SIZE |
The number of elements in the buffer. | |
ETL_DECLARE_DEBUG_COUNT | |
Internal debugging. | |
Friends | |
difference_type | operator- (const iterator &lhs, const iterator &rhs) |
difference_type | operator- (const const_iterator &lhs, const const_iterator &rhs) |
|
inline |
Assigns 'n' copies of a value to the deque. If asserts or exceptions are enabled, throws an etl::deque_full is 'n' is too large.
n | The number of copies to assign. |
value | The value to add.< |
Gets a reference to the item at the index. If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the index is out of range.
|
inline |
Gets a const reference to the item at the index. If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the index is out of range.
|
inline |
Gets a reference to the item at the back of the deque.
|
inline |
Gets a const reference to the item at the back of the deque.
|
inline |
Emplaces data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position>The | insert position. Emplaces data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full. |
insert_position>The | insert position. |
|
inline |
Emplaces data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position>The | insert position. |
|
inline |
Emplaces data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position>The | insert position. |
|
inline |
Emplaces data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position>The | insert position. |
|
inline |
Emplaces an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
Emplaces an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
Emplaces an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Emplaces an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
inline |
Erase an item. If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the position is out of range.
erase_position | The position to erase. |
|
inline |
erase a range. If asserts or exceptions are enabled, throws an etl::deque_out_of_bounds if the iterators are out of range.
range_begin | The beginning of the range to erase. |
range_end | The end of the range to erase. |
|
inline |
Gets a reference to the item at the front of the deque.
|
inline |
Gets a const reference to the item at the front of the deque.
|
inline |
Inserts data into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position>The | insert position. |
value>The | value to insert. |
|
inline |
Inserts 'n' copies of a value into the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
insert_position | The insert position. |
n | The number of values to insert. |
value | The value to insert. |
|
inline |
Inserts a range into the deque. If asserts or exceptions are enabled, throws an etl::deque_empty if the deque is full.
insert_position>The | insert position. |
range_begin | The beginning of the range to insert. |
range_end | The end of the range to insert. |
Gets a reference to the item at the index.
|
inline |
Gets a const reference to the item at the index.
|
inline |
Adds an item to the back of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
item | The item to push to the deque. |
|
inline |
Adds an item to the front of the deque. If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
item | The item to push to the deque. |
|
inline |
Resizes the deque. If asserts or exceptions are enabled, throws an etl::deque_full is 'new_size' is too large.
new_size | The new size of the deque. |
value | The value to assign if the new size is larger. Default = Default constructed value. |
|
friend |
class etl::deque |
A fixed capacity double ended queue.
T | The type of items this deque holds. |
MAX_SIZE_ | The capacity of the deque |
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< pointer >::difference_type | difference_type |
![]() | |
typedef T | value_type |
typedef size_t | size_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef etl::iterator_traits< pointer >::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 |
Public Member Functions | |
deque () | |
Default constructor. | |
~deque () | |
Destructor. | |
deque (const deque &other) | |
Copy constructor. | |
template<typename TIterator > | |
deque (TIterator begin_, TIterator end_, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0) | |
Assigns data to the deque. | |
deque (size_t n, const_reference value=value_type()) | |
Assigns data to the deque. | |
deque & | operator= (const deque &rhs) |
Assignment operator. | |
void | repair () |
Fix the internal pointers after a low level memory copy. | |
![]() | |
template<typename TIterator > | |
etl::enable_if<!etl::is_integral< TIterator >::value, void >::type | assign (TIterator range_begin, TIterator range_end) |
Assigns a range to the deque. | |
void | assign (size_type n, const value_type &value) |
reference | at (size_t index) |
const_reference | at (size_t index) const |
reference | operator[] (size_t index) |
const_reference | operator[] (size_t index) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
iterator | begin () |
Gets an iterator to the beginning of the deque. | |
const_iterator | begin () const |
Gets a const iterator to the beginning of the deque. | |
const_iterator | cbegin () const |
Gets a const iterator to the beginning of the deque. | |
iterator | end () |
Gets an iterator to the end of the deque. | |
const_iterator | end () const |
Gets a const iterator to the end of the deque. | |
const_iterator | cend () const |
Gets a const iterator to the end of the deque. | |
reverse_iterator | rbegin () |
Gets a reverse iterator to the end of the deque. | |
const_reverse_iterator | rbegin () const |
Gets a const reverse iterator to the end of the deque. | |
const_reverse_iterator | crbegin () const |
Gets a const reverse iterator to the end of the deque. | |
reverse_iterator | rend () |
Gets a reverse iterator to the beginning of the deque. | |
const_reverse_iterator | rend () const |
Gets a const reverse iterator to the beginning of the deque. | |
const_reverse_iterator | crend () const |
Gets a const reverse iterator to the beginning of the deque. | |
void | clear () |
Clears the deque. | |
void | fill (const T &value) |
Fills the deque. | |
iterator | insert (const_iterator insert_position, const value_type &value) |
template<typename T1 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1) |
template<typename T1 , typename T2 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
iterator | emplace (const_iterator insert_position, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
iterator | insert (const_iterator insert_position, size_type n, const value_type &value) |
template<typename TIterator > | |
enable_if<!etl::is_integral< TIterator >::value, iterator >::type | insert (const_iterator insert_position, TIterator range_begin, TIterator range_end) |
iterator | erase (const_iterator erase_position) |
iterator | erase (const_iterator range_begin, const_iterator range_end) |
void | push_back (const_reference item) |
reference | emplace_back () |
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 the oldest item from the deque. | |
void | push_front (const_reference item) |
reference | emplace_front () |
template<typename T1 > | |
reference | emplace_front (const T1 &value1) |
template<typename T1 , typename T2 > | |
reference | emplace_front (const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
reference | emplace_front (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
void | pop_front () |
Removes the oldest item from the deque. | |
void | resize (size_t new_size, const value_type &value=value_type()) |
ideque & | operator= (const ideque &rhs) |
Assignment operator. | |
![]() | |
size_type | size () const |
bool | empty () const |
bool | full () const |
size_type | max_size () const |
size_type | capacity () const |
size_t | available () const |
Static Public Attributes | |
static ETL_CONSTANT size_t | MAX_SIZE = MAX_SIZE_ |
Additional Inherited Members | |
![]() | |
ideque (pointer p_buffer_, size_t max_size_, size_t buffer_size_) | |
Constructor. | |
void | initialise () |
Initialise the deque. | |
void | repair_buffer (pointer p_buffer_) |
Fix the internal pointers after a low level memory copy. | |
~ideque () | |
Destructor. | |
![]() | |
deque_base (size_t max_size_, size_t buffer_size_) | |
Constructor. | |
~deque_base () | |
Destructor. | |
![]() | |
iterator | _begin |
iterator | _end |
Iterator to the _begin item in the deque. | |
pointer | p_buffer |
Iterator to the _end item in the deque. | |
![]() | |
size_type | current_size |
The current number of elements in the deque. | |
const size_type | CAPACITY |
The maximum number of elements in the deque. | |
const size_type | BUFFER_SIZE |
The number of elements in the buffer. | |
ETL_DECLARE_DEBUG_COUNT | |
Internal debugging. | |
bool etl::operator!= | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Not equal operator.
lhs | Reference to the _begin deque. |
rhs | Reference to the second deque. |
bool etl::operator< | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Less than operator.
lhs | Reference to the _begin deque. |
rhs | Reference to the second deque. |
bool etl::operator<= | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Less than or equal operator.
lhs | Reference to the _begin deque. |
rhs | Reference to the second deque. |
bool etl::operator== | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Template deduction guides.
Make Equal operator.
lhs | Reference to the _begin deque. |
rhs | Reference to the second deque. |
bool etl::operator> | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Greater than operator.
lhs | Reference to the _begin deque. |
rhs | Reference to the second deque. |
bool etl::operator>= | ( | const etl::ideque< T > & | lhs, |
const etl::ideque< T > & | rhs | ||
) |
Greater than or equal operator.
"lhs | Reference to the _begin deque. |
"rhs | Reference to the second deque. |