A stack that migrates from internal memory to external when its size exceeds a certain threshold. More...
#include <stack.h>
Inherits noncopyable.
Public Types | |
enum | { blocks_per_page = cfg::blocks_per_page, block_size = cfg::block_size } |
typedef ExternalStack::cfg | cfg |
typedef cfg::value_type | value_type |
typedef cfg::size_type | size_type |
typedef InternalStack | int_stack_type |
typedef ExternalStack | ext_stack_type |
Public Member Functions | |
void | swap (migrating_stack &obj) |
bool | internal () const |
Returns true if current implementation is internal, otherwise false. | |
bool | external () const |
Returns true if current implementation is external, otherwise false. | |
bool | empty () const |
size_type | size () const |
value_type & | top () |
const value_type & | top () const |
void | push (const value_type &val) |
void | pop () |
A stack that migrates from internal memory to external when its size exceeds a certain threshold.
For semantics of the methods see documentation of the STL std::stack
.
bool migrating_stack< CritSize, ExternalStack, InternalStack >::external | ( | ) | const [inline] |
Returns true if current implementation is external, otherwise false.
bool migrating_stack< CritSize, ExternalStack, InternalStack >::internal | ( | ) | const [inline] |
Returns true if current implementation is internal, otherwise false.