Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/iter-stack.hpp"
A Stack which can be popped by iterating.
This is a simple helper built by wrapping up STL's double ended queue (deque). Thus, each instance holds the full state, which is actually kept in heap allocated storage. Pushing of new elements and iterator use may be mixed.
Contrary to just using std::stack
Definition at line 122 of file iter-stack.hpp.
Public Member Functions | |
void | clear () |
bool | empty () const |
IterStack & | insert (TY const &elm) |
TY | pop () |
IterStack & | push (TY const &elm) |
IterStack & | push (TY &&elm) |
size_t | size () const |
Public Member Functions inherited from IterStateWrapper< TY, iter::IterDequeStorage< TY > > | |
IterStateWrapper (iter::IterDequeStorage< TY > &&initialState) | |
IterStateWrapper (iter::IterDequeStorage< TY > const &initialState) | |
bool | empty () const |
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterStateWrapper) | |
bool | isValid () const |
operator bool () const | |
reference | operator* () const |
IterStateWrapper & | operator++ () |
pointer | operator-> () const |
Additional Inherited Members | |
Public Types inherited from IterStateWrapper< TY, iter::IterDequeStorage< TY > > | |
typedef TY * | pointer |
typedef TY & | reference |
typedef TY | value_type |
Protected Member Functions inherited from IterStateWrapper< TY, iter::IterDequeStorage< TY > > | |
void | __throw_if_empty () const |
iter::IterDequeStorage< TY > & | stateCore () |
allow derived classes to access state representation | |
iter::IterDequeStorage< TY > const & | stateCore () const |