|
STXXL
1.4-dev
|
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.
Inheritance diagram for stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >:
Collaboration diagram for stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >:Public Types | |
| enum | { blocks_per_page = cfg::blocks_per_page, block_size = cfg::block_size } |
| typedef ExternalStack::cfg | cfg |
| typedef ExternalStack | ext_stack_type |
| typedef InternalStack | int_stack_type |
| typedef cfg::size_type | size_type |
| type for sizes (64-bit) More... | |
| typedef cfg::value_type | value_type |
| type of the elements stored in the stack More... | |
Public Member Functions | |
Constructors/Destructors | |
| migrating_stack () | |
| Default constructor: creates empty stack. More... | |
| virtual | ~migrating_stack () |
Accessor Functions | |
| void | swap (migrating_stack &obj) |
| value_type & | top () |
| Return mutable reference to the element at the top of the stack. Precondition: stack is not empty(). More... | |
| const value_type & | top () const |
| Return constant reference to the element at the top of the stack. Precondition: stack is not empty(). More... | |
| void | push (const value_type &val) |
| Inserts an element at the top of the stack. Postconditions: size() is incremented by 1, and top() is the inserted element. More... | |
| void | pop () |
| Removes the element at the top of the stack. Precondition: stack is not empty(). Postcondition: size() is decremented. More... | |
Miscellaneous | |
| bool | internal () const |
| Returns true if current implementation is internal, otherwise false. More... | |
| bool | external () const |
| Returns true if current implementation is external, otherwise false. More... | |
Capacity | |
| bool | empty () const |
| Returns true if the stack is empty. More... | |
| size_type | size () const |
| Returns the number of elements contained in the stack. More... | |
Private Types | |
| enum | { critical_size = CritSize } |
Private Member Functions | |
| template<class StackType > | |
| migrating_stack (const StackType &stack_) | |
| Copy-construction from a another stack of any type. More... | |
Private Member Functions inherited from stxxl::noncopyable | |
| noncopyable () | |
Private Attributes | |
| ext_stack_type * | ext_impl |
| int_stack_type * | int_impl |
| typedef ExternalStack::cfg stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::cfg |
| typedef ExternalStack stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::ext_stack_type |
| typedef InternalStack stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::int_stack_type |
| typedef cfg::size_type stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::size_type |
| typedef cfg::value_type stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::value_type |
| anonymous enum |
|
private |
|
private |
Copy-construction from a another stack of any type.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 862 of file stack.h.
References stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::ext_impl, and stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::int_impl.
|
inline |
|
inline |
|
private |
Definition at line 835 of file stack.h.
Referenced by stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::swap().
|
private |
Definition at line 834 of file stack.h.
Referenced by stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::swap().