|
Embedded Template Library 1.0
|
Classes | |
| class | etl::intrusive_queue_base< TLink > |
| class | etl::intrusive_queue< TValue, TLink > |
| class | etl::priority_queue_exception |
| class | etl::priority_queue_full |
| class | etl::priority_queue_iterator |
| class | etl::ipriority_queue< T, TContainer, TCompare > |
| This is the base for all priority queues that contain a particular type. More... | |
| class | etl::queue_exception |
| class | etl::queue_full |
| class | etl::queue_empty |
| class | etl::queue_base< MEMORY_MODEL > |
| class | etl::iqueue< T, MEMORY_MODEL > |
| This is the base for all queues that contain a particular type. More... | |
| class | etl::queue< T, SIZE, MEMORY_MODEL > |
A priority queue with the capacity defined at compile time, written in the STL style.
A First-in / first-out queue with the capacity defined at compile time, written in the STL style.
| class etl::intrusive_queue_base |
Base for intrusive queue. Stores elements derived any ETL type that supports an 'etl_next' pointer member.
| TLink | The link type that the value is derived from. |
Public Types | |
| typedef TLink | link_type |
Public Member Functions | |
| void | push (link_type &value) |
| void | pop () |
| template<typename TContainer> | |
| void | pop_into (TContainer &destination) |
| void | clear () |
| Clears the queue to the empty state. | |
| bool | empty () const |
| Checks if the queue is in the empty state. | |
| size_t | size () const |
| Returns the number of elements. | |
Protected Member Functions | |
| intrusive_queue_base () | |
| Constructor. | |
| ~intrusive_queue_base () | |
| Destructor. | |
Protected Attributes | |
| link_type * | p_back |
| Pointer to the current back of the queue. | |
| link_type | terminator |
| This link terminates the queue and points to the front of the queue. | |
| size_t | current_size |
| Counts the number of elements in the list. | |
|
inline |
Removes the oldest item from the queue. Undefined behaviour if the queue is already empty.
|
inline |
Removes the oldest item from the queue and pushes it to the destination. Undefined behaviour if the queue is already empty. NOTE: The destination must be an intrusive container that supports a push(TLink) member function.
|
inline |
Adds a value to the queue.
| value | The value to push to the queue. |
| class etl::intrusive_queue |
An intrusive queue. Stores elements derived from any type that supports an 'etl_next' pointer member.
| TValue | The type of value that the queue holds. |
| TLink | The link type that the value is derived from. |
Public Types | |
| typedef etl::intrusive_queue_base< TLink > | link_type |
| typedef TValue | value_type |
| typedef value_type * | pointer |
| typedef const value_type * | const_pointer |
| typedef value_type & | reference |
| typedef const value_type & | const_reference |
| typedef size_t | size_type |
| Public Types inherited from etl::intrusive_queue_base< TLink > | |
| typedef TLink | link_type |
Public Member Functions | |
| intrusive_queue () | |
| Constructor. | |
| reference | front () |
| reference | back () |
| const_reference | front () const |
| const_reference | back () const |
| Public Member Functions inherited from etl::intrusive_queue_base< TLink > | |
| void | push (link_type &value) |
| void | pop () |
| template<typename TContainer> | |
| void | pop_into (TContainer &destination) |
| void | clear () |
| Clears the queue to the empty state. | |
| bool | empty () const |
| Checks if the queue is in the empty state. | |
| size_t | size () const |
| Returns the number of elements. | |
Additional Inherited Members | |
| Protected Member Functions inherited from etl::intrusive_queue_base< TLink > | |
| intrusive_queue_base () | |
| Constructor. | |
| ~intrusive_queue_base () | |
| Destructor. | |
| Protected Attributes inherited from etl::intrusive_queue_base< TLink > | |
| link_type * | p_back |
| Pointer to the current back of the queue. | |
| link_type | terminator |
| This link terminates the queue and points to the front of the queue. | |
| size_t | current_size |
| Counts the number of elements in the list. | |
|
inline |
Gets a reference to the value at the back of the queue. Undefined behaviour if the queue is empty.
|
inline |
Gets a reference to the value at the back of the queue. Undefined behaviour if the queue is empty.
|
inline |
Gets a reference to the value at the front of the queue. Undefined behaviour if the queue is empty.
|
inline |
Gets a const reference to the value at the front of the queue. Undefined behaviour if the queue is empty.
| class etl::priority_queue_exception |
The base class for priority_queue exceptions.
Public Member Functions | |
| priority_queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::priority_queue_full |
The exception thrown when the queue is full.
Public Member Functions | |
| priority_queue_full (string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::priority_queue_exception | |
| priority_queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::priority_queue_iterator |
The priority queue iterator exception on reversed iterators
Public Member Functions | |
| priority_queue_iterator (string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::priority_queue_exception | |
| priority_queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::ipriority_queue |
This is the base for all priority queues that contain a particular type.
Normally a reference to this type will be taken from a derived queue. The TContainer specified must provide the front, push_back, pop_back, and assign methods to work correctly with priority_queue.
| T | The type of value that the queue holds. |
| TContainer | to hold the T queue values |
| TCompare | to use in comparing T values |
Public Types | |
| typedef T | value_type |
| The type stored in the queue. | |
| typedef TContainer | container_type |
| The container type used for priority queue. | |
| typedef TCompare | compare_type |
| The comparison type. | |
| typedef T & | reference |
| A reference to the type used in the queue. | |
| typedef const T & | const_reference |
| A const reference to the type used in the queue. | |
| typedef TContainer::size_type | size_type |
| The type used for determining the size of the queue. | |
| typedef etl::iterator_traits< typenameTContainer::iterator >::difference_type | difference_type |
Public Member Functions | |
| reference | top () |
| const_reference | top () const |
| void | push (const_reference value) |
| void | emplace () |
| template<typename T1> | |
| void | emplace (const T1 &value1) |
| template<typename T1, typename T2> | |
| void | emplace (const T1 &value1, const T2 &value2) |
| template<typename T1, typename T2, typename T3> | |
| void | emplace (const T1 &value1, const T2 &value2, const T3 &value3) |
| template<typename T1, typename T2, typename T3, typename T4> | |
| void | emplace (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
| template<typename TIterator> | |
| void | assign (TIterator first, TIterator last) |
| void | pop () |
| void | pop_into (reference destination) |
| size_type | size () const |
| Returns the current number of items in the priority queue. | |
| size_type | max_size () const |
| Returns the maximum number of items that can be queued. | |
| bool | empty () const |
| bool | full () const |
| size_type | available () const |
| void | clear () |
| Clears the queue to the empty state. | |
| ipriority_queue & | operator= (const ipriority_queue &rhs) |
| Assignment operator. | |
Protected Member Functions | |
| void | clone (const ipriority_queue &other) |
| Make this a clone of the supplied priority queue. | |
| ipriority_queue () | |
| The constructor that is called from derived classes. | |
|
inline |
Assigns values to the priority queue. If asserts or exceptions are enabled, emits priority_queue_full if priority queue does not have enough free space. If asserts or exceptions are enabled, emits priority_iterator if the iterators are reversed.
| first | The iterator to the first element. |
| last | The iterator to the last element + 1. |
|
inline |
Returns the remaining capacity.
|
inline |
Emplaces a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Emplaces a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Emplaces a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Emplaces a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Emplaces a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Checks to see if the priority queue is empty.
|
inline |
Checks to see if the priority queue is full.
|
inline |
Removes the oldest value from the back of the priority queue. Does nothing if the priority queue is already empty.
|
inline |
Gets the highest priority value in the priority queue and assigns it to destination and removes it from the queue.
|
inline |
Adds a value to the queue. If asserts or exceptions are enabled, throws an etl::priority_queue_full is the priority queue is already full.
| value | The value to push to the queue. |
|
inline |
Gets a reference to the highest priority value in the priority queue.
|
inline |
Gets a const reference to the highest priority value in the priority queue.
| class etl::queue_exception |
The base class for queue exceptions.
Public Member Functions | |
| queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::queue_full |
The exception thrown when the queue is full.
Public Member Functions | |
| queue_full (string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::queue_exception | |
| queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::queue_empty |
The exception thrown when the queue is empty.
Public Member Functions | |
| queue_empty (string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::queue_exception | |
| queue_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
| Public Member Functions inherited from etl::exception | |
| 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 | |
| Public Types inherited from etl::exception | |
| typedef const char * | string_type |
| typedef int | numeric_type |
| class etl::queue_base |
The base class for all queues.
Public Types | |
| typedef etl::size_type_lookup< MEMORY_MODEL >::type | size_type |
| The type used for determining the size of queue. | |
Public Member Functions | |
| size_type | size () const |
| Returns the current number of items in the queue. | |
| size_type | max_size () const |
| Returns the maximum number of items that can be queued. | |
| size_type | capacity () const |
| Returns the maximum number of items that can be queued. | |
| bool | empty () const |
| bool | full () const |
| size_type | available () const |
Protected Member Functions | |
| queue_base (size_type max_size_) | |
| The constructor that is called from derived classes. | |
| ~queue_base () | |
| Destructor. | |
| void | add_in () |
| Increments (and wraps) the 'in' index value to record a queue addition. | |
| void | del_out () |
| Increments (and wraps) the 'out' index value to record a queue deletion. | |
| void | index_clear () |
| Clears the indexes. | |
Protected Attributes | |
| size_type | in |
| Where to input new data. | |
| size_type | out |
| Where to get the oldest data. | |
| size_type | current_size |
| The number of items in the queue. | |
| const size_type | CAPACITY |
| The maximum number of items in the queue. | |
| ETL_DECLARE_DEBUG_COUNT | |
| For internal debugging purposes. | |
|
inline |
Returns the remaining capacity.
|
inline |
Checks to see if the queue is empty.
|
inline |
Checks to see if the queue is full.
| class etl::iqueue |
This is the base for all queues that contain a particular type.
Normally a reference to this type will be taken from a derived queue.
| T | The type of value that the queue holds. |
Public Types | |
| typedef T | value_type |
| The type stored in the queue. | |
| typedef T & | reference |
| A reference to the type used in the queue. | |
| typedef const T & | const_reference |
| A const reference to the type used in the queue. | |
| typedef T * | pointer |
| A pointer to the type used in the queue. | |
| typedef const T * | const_pointer |
| A const pointer to the type used in the queue. | |
| typedef base_t::size_type | size_type |
| The type used for determining the size of the queue. | |
| Public Types inherited from etl::queue_base< etl::memory_model::MEMORY_MODEL_LARGE > | |
| typedef etl::size_type_lookup< MEMORY_MODEL >::type | size_type |
| The type used for determining the size of queue. | |
Public Member Functions | |
| reference | front () |
| const_reference | front () const |
| reference | back () |
| const_reference | back () const |
| void | push (const_reference value) |
| reference | emplace () |
| template<typename T1> | |
| reference | emplace (const T1 &value1) |
| template<typename T1, typename T2> | |
| reference | emplace (const T1 &value1, const T2 &value2) |
| template<typename T1, typename T2, typename T3> | |
| reference | emplace (const T1 &value1, const T2 &value2, const T3 &value3) |
| template<typename T1, typename T2, typename T3, typename T4> | |
| reference | emplace (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
| void | clear () |
| Clears the queue to the empty state. | |
| void | pop () |
| void | pop_into (reference destination) |
| template<typename TContainer> | |
| void | pop_into (TContainer &destination) |
| iqueue & | operator= (const iqueue &rhs) |
| Assignment operator. | |
| bool | full () const |
| bool | empty () const |
| void | add_in () |
| Increments (and wraps) the 'in' index value to record a queue addition. | |
| void | del_out () |
| Increments (and wraps) the 'out' index value to record a queue deletion. | |
| Public Member Functions inherited from etl::queue_base< etl::memory_model::MEMORY_MODEL_LARGE > | |
| size_type | size () const |
| Returns the current number of items in the queue. | |
| size_type | max_size () const |
| Returns the maximum number of items that can be queued. | |
| size_type | capacity () const |
| Returns the maximum number of items that can be queued. | |
| bool | empty () const |
| bool | full () const |
| size_type | available () const |
Public Attributes | |
| size_type | in |
| Where to input new data. | |
| size_type | out |
| Where to get the oldest data. | |
| const size_type | CAPACITY |
| The maximum number of items in the queue. | |
| size_type | current_size |
| The number of items in the queue. | |
Protected Member Functions | |
| void | clone (const iqueue &other) |
| Make this a clone of the supplied queue. | |
| iqueue (T *p_buffer_, size_type max_size_) | |
| The constructor that is called from derived classes. | |
| ~iqueue () | |
| Destructor. | |
| Protected Member Functions inherited from etl::queue_base< etl::memory_model::MEMORY_MODEL_LARGE > | |
| queue_base (size_type max_size_) | |
| The constructor that is called from derived classes. | |
| ~queue_base () | |
| Destructor. | |
| void | add_in () |
| Increments (and wraps) the 'in' index value to record a queue addition. | |
| void | del_out () |
| Increments (and wraps) the 'out' index value to record a queue deletion. | |
| void | index_clear () |
| Clears the indexes. | |
Additional Inherited Members | |
| Protected Attributes inherited from etl::queue_base< etl::memory_model::MEMORY_MODEL_LARGE > | |
| size_type | in |
| Where to input new data. | |
| size_type | out |
| Where to get the oldest data. | |
| size_type | current_size |
| The number of items in the queue. | |
| const size_type | CAPACITY |
| The maximum number of items in the queue. | |
| ETL_DECLARE_DEBUG_COUNT | |
| For internal debugging purposes. | |
|
inline |
Gets a reference to the value at the back of the queue.
|
inline |
Gets a const reference to the value at the back of the queue.
|
inline |
Constructs a default constructed value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
inline |
Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
| value1 | The argument to use to construct the item to push to the queue. |
|
inline |
Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
| value1 | The first argument to use to construct the item to push to the queue. |
| value2 | The second argument to use to construct the item to push to the queue. |
|
inline |
Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
| value1 | The first argument to use to construct the item to push to the queue. |
| value2 | The second argument to use to construct the item to push to the queue. |
| value3 | The third argument to use to construct the item to push to the queue. |
|
inline |
Constructs a value in the queue 'in place'. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
| value1 | The first argument to use to construct the item to push to the queue. |
| value2 | The second argument to use to construct the item to push to the queue. |
| value3 | The third argument to use to construct the item to push to the queue. |
| value4 | The fourth argument to use to construct the item to push to the queue. |
|
inline |
Checks to see if the queue is empty.
|
inline |
Gets a reference to the value at the front of the queue.
|
inline |
Gets a const reference to the value at the front of the queue.
|
inline |
Checks to see if the queue is full.
|
inline |
Removes the oldest value from the back of the queue. Does nothing if the queue is already empty. If asserts or exceptions are enabled, throws an etl::queue_empty if the queue is empty.
|
inline |
Gets the oldest value and removes it from the front of the queue. If asserts or exceptions are enabled, throws an etl::queue_empty if the queue is empty.
|
inline |
Gets the oldest value and removes it from the front of the queue and pushes it to the destination container. If asserts or exceptions are enabled, throws an etl::queue_empty if the queue is empty. NOTE: The destination must support a push(T) member function.
|
inline |
Adds a value to the queue. If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
| value | The value to push to the queue. |
| class etl::queue |
A fixed capacity queue. This queue does not support concurrent access by different threads.
| T | The type this queue should support. |
| SIZE | The maximum capacity of the queue. |
| MEMORY_MODEL | The memory model for the queue. Determines the type of the internal counter variables. |
Public Types | |
| typedef base_t::size_type | size_type |
| typedef etl::aligned_storage< sizeof(T), etl::alignment_of< T >::value >::type | container_type |
| Public Types inherited from etl::iqueue< T, etl::memory_model::MEMORY_MODEL_LARGE > | |
| typedef T | value_type |
| The type stored in the queue. | |
| typedef T & | reference |
| A reference to the type used in the queue. | |
| typedef const T & | const_reference |
| A const reference to the type used in the queue. | |
| typedef T * | pointer |
| A pointer to the type used in the queue. | |
| typedef const T * | const_pointer |
| A const pointer to the type used in the queue. | |
| typedef base_t::size_type | size_type |
| The type used for determining the size of the queue. | |
| Public Types inherited from etl::queue_base< MEMORY_MODEL > | |
| typedef etl::size_type_lookup< MEMORY_MODEL >::type | size_type |
| The type used for determining the size of queue. | |
Public Member Functions | |
| ETL_STATIC_ASSERT ((SIZE<=etl::integral_limits< size_type >::max), "Size too large for memory model") | |
| queue () | |
| Default constructor. | |
| queue (const queue &rhs) | |
| Copy constructor. | |
| ~queue () | |
| Destructor. | |
| queue & | operator= (const queue &rhs) |
| Assignment operator. | |
| Public Member Functions inherited from etl::iqueue< T, etl::memory_model::MEMORY_MODEL_LARGE > | |
| bool | full () const |
| bool | empty () const |
| void | add_in () |
| Increments (and wraps) the 'in' index value to record a queue addition. | |
| void | del_out () |
| Increments (and wraps) the 'out' index value to record a queue deletion. | |
| reference | front () |
| reference | back () |
| void | push (const_reference value) |
| reference | emplace () |
| void | clear () |
| Clears the queue to the empty state. | |
| void | pop () |
| void | pop_into (reference destination) |
| iqueue & | operator= (const iqueue &rhs) |
| Assignment operator. | |
| Public Member Functions inherited from etl::queue_base< MEMORY_MODEL > | |
| size_type | size () const |
| Returns the current number of items in the queue. | |
| size_type | max_size () const |
| Returns the maximum number of items that can be queued. | |
| size_type | capacity () const |
| Returns the maximum number of items that can be queued. | |
| bool | empty () const |
| bool | full () const |
| size_type | available () const |
Static Public Attributes | |
| static ETL_CONSTANT size_type | MAX_SIZE = size_type(SIZE) |
Additional Inherited Members | |
| Public Attributes inherited from etl::iqueue< T, etl::memory_model::MEMORY_MODEL_LARGE > | |
| size_type | in |
| Where to input new data. | |
| size_type | out |
| Where to get the oldest data. | |
| const size_type | CAPACITY |
| The maximum number of items in the queue. | |
| size_type | current_size |
| The number of items in the queue. | |
| Protected Member Functions inherited from etl::iqueue< T, etl::memory_model::MEMORY_MODEL_LARGE > | |
| void | clone (const iqueue &other) |
| Make this a clone of the supplied queue. | |
| iqueue (T *p_buffer_, size_type max_size_) | |
| The constructor that is called from derived classes. | |
| ~iqueue () | |
| Destructor. | |
| Protected Member Functions inherited from etl::queue_base< MEMORY_MODEL > | |
| queue_base (size_type max_size_) | |
| The constructor that is called from derived classes. | |
| ~queue_base () | |
| Destructor. | |
| void | add_in () |
| Increments (and wraps) the 'in' index value to record a queue addition. | |
| void | del_out () |
| Increments (and wraps) the 'out' index value to record a queue deletion. | |
| void | index_clear () |
| Clears the indexes. | |
| Protected Attributes inherited from etl::queue_base< MEMORY_MODEL > | |
| size_type | in |
| Where to input new data. | |
| size_type | out |
| Where to get the oldest data. | |
| size_type | current_size |
| The number of items in the queue. | |
| const size_type | CAPACITY |
| The maximum number of items in the queue. | |
| ETL_DECLARE_DEBUG_COUNT | |
| For internal debugging purposes. | |