Embedded Template Library 1.0
|
Classes | |
class | etl::array_view_bounds |
class | etl::array_view_uninitialised |
class | etl::array_wrapper_bounds |
class | etl::intrusive_stack_base< TLink > |
class | etl::intrusive_stack< TValue, TLink > |
class | etl::stack_exception |
class | etl::stack_full |
class | etl::stack_empty |
class | etl::stack_base |
class | etl::istack< T > |
This is the base for all stacks that contain a particular type. More... | |
class | etl::stack< T, SIZE > |
class | etl::string_view_bounds |
class | etl::string_view_uninitialised |
A Last-in / first-out stack with the capacity defined at compile time, written in the STL style.
class etl::array_view_bounds |
The exception thrown when the index is out of bounds.
Public Member Functions | |
array_view_bounds (string_type file_name_, numeric_type line_number_) | |
![]() | |
array_view_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::array_view_uninitialised |
The exception thrown when the view is uninitialised.
Public Member Functions | |
array_view_uninitialised (string_type file_name_, numeric_type line_number_) | |
![]() | |
array_view_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::array_wrapper_bounds |
The exception thrown when the index is out of bounds.
Public Member Functions | |
array_wrapper_bounds (string_type file_name_, numeric_type line_number_) | |
![]() | |
array_wrapper_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::intrusive_stack_base |
Base for intrusive stack. Stores elements derived any 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 | reverse () |
Reverses the stack order. | |
void | clear () |
Clears the stack to the empty state. | |
bool | empty () const |
Checks if the stack is in the empty state. | |
size_t | size () const |
Returns the number of elements. | |
Protected Member Functions | |
intrusive_stack_base () | |
Constructor. | |
~intrusive_stack_base () | |
Destructor. | |
Protected Attributes | |
link_type * | p_top |
The current top of the stack. | |
link_type | terminator |
Terminator link of the queue. | |
size_t | current_size |
Counts the number of elements in the list. | |
|
inline |
Removes the oldest item from the top of the stack. Undefined behaviour if the stack 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 stack.
value | The value to push to the stack. |
class etl::intrusive_stack |
An intrusive stack. Stores elements derived from any type that supports an 'etl_next' pointer member.
TValue | The type of value that the stack holds. |
TLink | The link type that the value is derived from. |
Public Types | |
typedef etl::intrusive_stack_base< TLink >::link_type | 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 |
![]() | |
typedef TLink | link_type |
Public Member Functions | |
intrusive_stack () | |
Constructor. | |
reference | top () |
const_reference | top () const |
![]() | |
void | push (link_type &value) |
void | pop () |
template<typename TContainer > | |
void | pop_into (TContainer &destination) |
void | reverse () |
Reverses the stack order. | |
void | clear () |
Clears the stack to the empty state. | |
bool | empty () const |
Checks if the stack is in the empty state. | |
size_t | size () const |
Returns the number of elements. | |
Additional Inherited Members | |
![]() | |
intrusive_stack_base () | |
Constructor. | |
~intrusive_stack_base () | |
Destructor. | |
![]() | |
link_type * | p_top |
The current top of the stack. | |
link_type | terminator |
Terminator link of the queue. | |
size_t | current_size |
Counts the number of elements in the list. | |
|
inline |
Gets a reference to the value at the top of the stack. Undefined behaviour if the stack is empty.
|
inline |
Gets a const reference to the value at the top of the stack.
class etl::stack_exception |
The base class for stack exceptions.
Public Member Functions | |
stack_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::stack_full |
The exception thrown when the stack is full.
Public Member Functions | |
stack_full (string_type file_name_, numeric_type line_number_) | |
![]() | |
stack_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::stack_empty |
The exception thrown when the stack is empty.
Public Member Functions | |
stack_empty (string_type file_name_, numeric_type line_number_) | |
![]() | |
stack_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::stack_base |
A fixed capacity stack written in the STL style.
Public Types | |
typedef size_t | size_type |
The type used for determining the size of stack. | |
Public Member Functions | |
bool | empty () const |
bool | full () const |
size_type | size () const |
Returns the current number of items top the stack. | |
size_type | max_size () const |
Returns the maximum number of items that can be stacked. | |
size_t | available () const |
Protected Member Functions | |
stack_base (size_type max_size_) | |
The constructor that is called from derived classes. | |
~stack_base () | |
Destructor. | |
void | add_in () |
Increments the indexes value to record a stack addition. | |
void | del_out () |
Decrements the indexes value to record a queue deletion. | |
void | index_clear () |
Clears all of the indexes. | |
Protected Attributes | |
size_type | top_index |
The index of the top of the stack. | |
size_type | current_size |
The number of items in the stack. | |
const size_type | CAPACITY |
The maximum number of items in the stack. | |
ETL_DECLARE_DEBUG_COUNT | |
For internal debugging purposes. | |
|
inline |
Returns the remaining capacity.
|
inline |
Checks to see if the stack is empty.
|
inline |
Checks to see if the stack is full.
class etl::istack |
This is the base for all stacks that contain a particular type.
Normally a reference to this type will be taken from a derived stack.
T | The type of value that the stack holds. |
Public Types | |
typedef T | value_type |
The type stored in the stack. | |
typedef T & | reference |
A reference to the type used in the stack. | |
typedef const T & | const_reference |
A const reference to the type used in the stack. | |
typedef T * | pointer |
A pointer to the type used in the stack. | |
typedef const T * | const_pointer |
A const pointer to the type used in the stack. | |
typedef stack_base::size_type | size_type |
The type used for determining the size of the stack. | |
![]() | |
typedef size_t | size_type |
The type used for determining the size of stack. | |
Public Member Functions | |
reference | top () |
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) |
const_reference | top () const |
void | clear () |
Clears the stack to the empty state. | |
void | pop () |
Removes the oldest item from the top of the stack. | |
void | pop_into (reference destination) |
Removes the oldest item from the top of the stack and puts it in the destination. | |
template<typename TContainer > | |
void | pop_into (TContainer &destination) |
void | reverse () |
Reverses the stack. | |
istack & | operator= (const istack &rhs) |
Assignment operator. | |
![]() | |
bool | empty () const |
bool | full () const |
size_type | size () const |
Returns the current number of items top the stack. | |
size_type | max_size () const |
Returns the maximum number of items that can be stacked. | |
size_t | available () const |
Protected Member Functions | |
void | clone (const istack &other) |
Make this a clone of the supplied stack. | |
istack (T *p_buffer_, size_type max_size_) | |
The constructor that is called from derived classes. | |
~istack () | |
Destructor. | |
![]() | |
stack_base (size_type max_size_) | |
The constructor that is called from derived classes. | |
~stack_base () | |
Destructor. | |
void | add_in () |
Increments the indexes value to record a stack addition. | |
void | del_out () |
Decrements the indexes value to record a queue deletion. | |
void | index_clear () |
Clears all of the indexes. | |
Additional Inherited Members | |
![]() | |
size_type | top_index |
The index of the top of the stack. | |
size_type | current_size |
The number of items in the stack. | |
const size_type | CAPACITY |
The maximum number of items in the stack. | |
ETL_DECLARE_DEBUG_COUNT | |
For internal debugging purposes. | |
|
inline |
Constructs a value in the stack place'. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
|
inline |
Constructs a value in the stack place'. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
Constructs a value in the stack place'. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
|
inline |
Constructs a value in the stack place'. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
|
inline |
Constructs a value in the stack place'. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
|
inline |
Removes the oldest item from the top of the stack and pushes it to the destination container. NOTE: The destination must support a push(T) member function.
|
inline |
Adds a value to the stack. If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
value | The value to push to the stack. |
|
inline |
Gets a reference to the value at the top of the stack.
|
inline |
Gets a const reference to the value at the top of the stack.
class etl::stack |
A fixed capacity stack. This stack does not support concurrent access by different threads.
T | The type this stack should support. |
MAX_SIZE | The maximum capacity of the stack. |
Public Types | |
typedef etl::aligned_storage< sizeof(T), etl::alignment_of< T >::value >::type | container_type |
![]() | |
typedef T | value_type |
The type stored in the stack. | |
typedef T & | reference |
A reference to the type used in the stack. | |
typedef const T & | const_reference |
A const reference to the type used in the stack. | |
typedef T * | pointer |
A pointer to the type used in the stack. | |
typedef const T * | const_pointer |
A const pointer to the type used in the stack. | |
typedef stack_base::size_type | size_type |
The type used for determining the size of the stack. | |
![]() | |
typedef size_t | size_type |
The type used for determining the size of stack. | |
Public Member Functions | |
stack () | |
Default constructor. | |
stack (const stack &rhs) | |
Copy constructor. | |
~stack () | |
Destructor. | |
stack & | operator= (const stack &rhs) |
Assignment operator. | |
![]() | |
reference | top () |
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) |
const_reference | top () const |
void | clear () |
Clears the stack to the empty state. | |
void | pop () |
Removes the oldest item from the top of the stack. | |
void | pop_into (reference destination) |
Removes the oldest item from the top of the stack and puts it in the destination. | |
template<typename TContainer > | |
void | pop_into (TContainer &destination) |
void | reverse () |
Reverses the stack. | |
istack & | operator= (const istack &rhs) |
Assignment operator. | |
![]() | |
bool | empty () const |
bool | full () const |
size_type | size () const |
Returns the current number of items top the stack. | |
size_type | max_size () const |
Returns the maximum number of items that can be stacked. | |
size_t | available () const |
Static Public Attributes | |
static ETL_CONSTANT size_t | MAX_SIZE = SIZE |
Additional Inherited Members | |
![]() | |
void | clone (const istack &other) |
Make this a clone of the supplied stack. | |
istack (T *p_buffer_, size_type max_size_) | |
The constructor that is called from derived classes. | |
~istack () | |
Destructor. | |
![]() | |
stack_base (size_type max_size_) | |
The constructor that is called from derived classes. | |
~stack_base () | |
Destructor. | |
void | add_in () |
Increments the indexes value to record a stack addition. | |
void | del_out () |
Decrements the indexes value to record a queue deletion. | |
void | index_clear () |
Clears all of the indexes. | |
![]() | |
size_type | top_index |
The index of the top of the stack. | |
size_type | current_size |
The number of items in the stack. | |
const size_type | CAPACITY |
The maximum number of items in the stack. | |
ETL_DECLARE_DEBUG_COUNT | |
For internal debugging purposes. | |
class etl::string_view_bounds |
The exception thrown when the index is out of bounds.
Public Member Functions | |
string_view_bounds (string_type file_name_, numeric_type line_number_) | |
![]() | |
string_view_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::string_view_uninitialised |
The exception thrown when the view is uninitialised.
Public Member Functions | |
string_view_uninitialised (string_type file_name_, numeric_type line_number_) | |
![]() | |
string_view_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 |