Stxxl  1.3.2
Public Types | Public Member Functions | List of all members
migrating_stack< CritSize, ExternalStack, InternalStack > Class Template Reference

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. More...
 
bool external () const
 Returns true if current implementation is external, otherwise false. More...
 
bool empty () const
 
size_type size () const
 
value_type & top ()
 
const value_type & top () const
 
void push (const value_type &val)
 
void pop ()
 

Detailed Description

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
class migrating_stack< CritSize, ExternalStack, InternalStack >

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.

Member Function Documentation

template<unsigned_type CritSize, class ExternalStack , class InternalStack >
bool migrating_stack< CritSize, ExternalStack, InternalStack >::external ( ) const
inline

Returns true if current implementation is external, otherwise false.

template<unsigned_type CritSize, class ExternalStack , class InternalStack >
bool migrating_stack< CritSize, ExternalStack, InternalStack >::internal ( ) const
inline

Returns true if current implementation is internal, otherwise false.


The documentation for this class was generated from the following file: