Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
stack_base Class Reference
[stack]
A fixed capacity stack written in the STL style. More...
#include <stack.h>
Inherited by istack< T >.
Public Types | |
typedef size_t | size_type |
The type used for determining the size of stack. | |
Public Member Functions | |
bool | empty () const |
Checks to see if the stack is empty. | |
bool | full () const |
Checks to see if the stack is full. | |
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 |
Returns the remaining capacity. | |
Protected Member Functions | |
stack_base (size_type max_size_) | |
The constructor that is called from derived classes. | |
void | add_in () |
Increments the indexes value to record a stack addition. | |
void | del_out () |
Decrements the indexes value to record a queue deletion. | |
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::debug_count | construct_count |
For internal debugging purposes. |
Detailed Description
A fixed capacity stack written in the STL style.
This stack cannot be used for concurrent access from multiple threads.
Definition at line 106 of file stack.h.
Member Typedef Documentation
typedef size_t size_type |
The type used for determining the size of stack.
Reimplemented in istack< T >.
Constructor & Destructor Documentation
stack_base | ( | size_type | max_size_ ) | [protected] |
Member Function Documentation
void add_in | ( | ) | [protected] |
size_t available | ( | ) | const |
void del_out | ( | ) | [protected] |
bool empty | ( | ) | const |
bool full | ( | ) | const |
size_type max_size | ( | ) | const |
size_type size | ( | ) | const |
Field Documentation
etl::debug_count construct_count [protected] |
size_type current_size [protected] |
Generated on Tue Jul 12 2022 14:05:54 by
