|
Embedded Template Library
1.0
|
#include <stack_base.h>
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 | capacity () const |
| Returns the maximum number of items that can be stacked. | |
| size_type | max_size () const |
| Returns the maximum number of items that can be stacked. | |
| size_t | available () const |
| void | clear () |
| Clears the stack to the empty state. | |
| void | pop () |
Protected Member Functions | |
| stack_base (size_type max_size) | |
| The constructor that is called from derived classes. | |
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 | MAX_SIZE |
| The maximum number of items in the stack. | |
A fixed capacity stack written in the STL style. This stack cannot be used for concurrent access from multiple threads.
|
inline |
Returns the remaining capacity.
|
inline |
Checks to see if the stack is empty.
|
inline |
Checks to see if the stack is full.
|
inline |
Removes the oldest item from the top of the stack. Does nothing if the stack is already empty.