Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
stxxl::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>

Inheritance diagram for stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >:
Inheritance graph
[legend]
Collaboration diagram for stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >:
Collaboration graph
[legend]

List of all members.

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

 migrating_stack ()
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_typetop ()
const value_typetop () const
void push (const value_type &val)
void pop ()
virtual ~migrating_stack ()

Private Types

enum  { critical_size = CritSize }

Private Member Functions

template<class stack_type >
 migrating_stack (const stack_type &stack_)

Private Attributes

int_stack_typeint_impl
ext_stack_typeext_impl

Detailed Description

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
class stxxl::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.

Definition at line 684 of file stack.h.


Member Typedef Documentation

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
typedef ExternalStack::cfg stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::cfg

Definition at line 687 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
typedef ExternalStack stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::ext_stack_type

Definition at line 697 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
typedef InternalStack stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::int_stack_type

Definition at line 696 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
typedef cfg::size_type stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::size_type

Definition at line 689 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
typedef cfg::value_type stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::value_type

Definition at line 688 of file stack.h.


Member Enumeration Documentation

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
anonymous enum
Enumerator:
blocks_per_page 
block_size 

Definition at line 690 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
anonymous enum [private]
Enumerator:
critical_size 

Definition at line 700 of file stack.h.


Constructor & Destructor Documentation

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
template<class stack_type >
stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::migrating_stack ( const stack_type &  stack_) [private]
template<unsigned_type CritSize, class ExternalStack, class InternalStack>
stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::migrating_stack ( ) [inline]

Definition at line 710 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
virtual stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::~migrating_stack ( ) [inline, virtual]

Definition at line 778 of file stack.h.


Member Function Documentation

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
bool stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::empty ( ) const [inline]

Definition at line 731 of file stack.h.

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

Returns true if current implementation is external, otherwise false.

Definition at line 725 of file stack.h.

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

Returns true if current implementation is internal, otherwise false.

Definition at line 719 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
void stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::pop ( ) [inline]

Definition at line 769 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
void stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::push ( const value_type val) [inline]

Definition at line 751 of file stack.h.

References UNLIKELY.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
size_type stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::size ( ) const [inline]

Definition at line 736 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
void stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::swap ( migrating_stack< CritSize, ExternalStack, InternalStack > &  obj) [inline]
template<unsigned_type CritSize, class ExternalStack, class InternalStack>
value_type& stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::top ( ) [inline]

Definition at line 741 of file stack.h.

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
const value_type& stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::top ( ) const [inline]

Definition at line 746 of file stack.h.


Member Data Documentation

template<unsigned_type CritSize, class ExternalStack, class InternalStack>
ext_stack_type* stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::ext_impl [private]
template<unsigned_type CritSize, class ExternalStack, class InternalStack>
int_stack_type* stxxl::migrating_stack< CritSize, ExternalStack, InternalStack >::int_impl [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines