template<typename T>
class Sawyer::Container::Stack< T >
Stack-based container.
The stack stores values in a last-in-first-out order. New items are pushed onto the top of the stack and existing items are popped from the top of the stack.
Definition at line 22 of file Stack.h.
|
| Stack () |
| Construct an empty stack.
|
|
template<class Iterator > |
| Stack (const boost::iterator_range< Iterator > &range) |
| Construct a stack from an iterator range.
|
|
size_t | size () const |
| Returns the number of items on the stack.
|
|
bool | isEmpty () const |
| Determines if the stack is empty. More...
|
|
Stack & | push (const Value &value) |
| Push new item onto stack. More...
|
|
Value | pop () |
| Pop existing item from stack. More...
|
|
|
Value & | top () |
| Returns the top item. More...
|
|
const Value & | top () const |
| Returns the top item. More...
|
|
|
Value & | get (size_t idx) |
| Access an item not at the top of the stack. More...
|
|
const Value & | get (size_t idx) const |
| Access an item not at the top of the stack. More...
|
|
Value & | operator[] (size_t idx) |
| Access an item not at the top of the stack. More...
|
|
const Value & | operator[] (size_t idx) const |
| Access an item not at the top of the stack. More...
|
|