chunkedseq
container library for large in-memory data sets
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc > Class Template Reference

[fixedcapacitystack] More...

#include <fixedcapacitybase.hpp>

Public Types

using size_type = int
 
using value_type = typename Array_alloc::value_type
 
using allocator_type = Item_alloc
 
using segment_type = segment< value_type * >
 

Public Member Functions

 stack ()
 
 stack (const stack &other)
 
 stack (size_type nb, const value_type &val)
 
 ~stack ()
 
size_type size () const
 
bool full () const
 
bool empty () const
 
bool partial () const
 
void push_front (const value_type &x)
 
void push_back (const value_type &x)
 
value_typefront () const
 
value_typeback () const
 
value_type pop_front ()
 
value_type pop_back ()
 
void frontn (value_type *dst, size_type nb)
 
void backn (value_type *dst, size_type nb)
 
void pushn_front (const value_type *xs, size_type nb)
 
void pushn_back (const value_type *xs, size_type nb)
 
template<class Body >
void pushn_back (const Body &body, size_type nb)
 
void popn_front (size_type nb)
 
void popn_back (size_type nb)
 
void popn_front (value_type *dst, size_type nb)
 
void popn_back (value_type *dst, size_type nb)
 
void transfer_from_back_to_front (stack &target, size_type nb)
 
void transfer_from_front_to_back (stack &target, size_type nb)
 
value_typeoperator[] (size_type ix) const
 
value_typeoperator[] (size_t ix) const
 
void clear ()
 
void swap (stack &other)
 
size_type index_of_last_item () const
 
segment_type segment_by_index (size_type ix) const
 
size_type index_of_pointer (const value_type *p) const
 
template<class Body >
void for_each (const Body &body) const
 
template<class Body >
void for_each_segment (size_type lo, size_type hi, const Body &body) const
 

Static Public Attributes

static constexpr int capacity = Array_alloc::capacity
 

Detailed Description

template<class Array_alloc, class Item_alloc = std::allocator<typename Array_alloc::value_type>>
class pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >

Fixed-capacity contiguous stack

Although supported, pushes and pops on the front of the container take time linear in the size of the container.

Container properties

Template Parameters
Array_allocType of the allocator object used to define the storage policy of the array that is used by the stack to store the items of the stack.
Item_allocType of the allocator object used to define the storage allocation model. By default, the allocator class template is used, which defines the simplest memory allocation model and is value-independent. Aliased as member type vector::allocator_type.

Definition at line 1581 of file fixedcapacitybase.hpp.

Member Typedef Documentation

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
using pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::allocator_type = Item_alloc

Definition at line 1586 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
using pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::segment_type = segment<value_type*>

Definition at line 1587 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
using pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::size_type = int

Definition at line 1584 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
using pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::value_type = typename Array_alloc::value_type

Definition at line 1585 of file fixedcapacitybase.hpp.

Constructor & Destructor Documentation

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::stack ( )
inline

Definition at line 1606 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::stack ( const stack< Array_alloc, Item_alloc > &  other)
inline

Definition at line 1609 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::stack ( size_type  nb,
const value_type val 
)
inline

Definition at line 1617 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::~stack ( )
inline

Definition at line 1621 of file fixedcapacitybase.hpp.

Member Function Documentation

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type& pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::back ( ) const
inline

Definition at line 1659 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::backn ( value_type dst,
size_type  nb 
)
inline

Definition at line 1686 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::clear ( )
inline

Definition at line 1757 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
bool pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::empty ( ) const
inline

Definition at line 1633 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
template<class Body >
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::for_each ( const Body &  body) const
inline

Definition at line 1786 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
template<class Body >
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::for_each_segment ( size_type  lo,
size_type  hi,
const Body &  body 
) const
inline

Definition at line 1792 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type& pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::front ( ) const
inline

Definition at line 1654 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::frontn ( value_type dst,
size_type  nb 
)
inline

Definition at line 1681 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
bool pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::full ( ) const
inline

Definition at line 1629 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
size_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::index_of_last_item ( ) const
inline

Definition at line 1766 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
size_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::index_of_pointer ( const value_type p) const
inline

Definition at line 1779 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type& pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::operator[] ( size_type  ix) const
inline

Definition at line 1749 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type& pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::operator[] ( size_t  ix) const
inline

Definition at line 1753 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
bool pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::partial ( ) const
inline

Definition at line 1637 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::pop_back ( )
inline

Definition at line 1673 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
value_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::pop_front ( )
inline

Definition at line 1664 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::popn_back ( size_type  nb)
inline

Definition at line 1718 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::popn_back ( value_type dst,
size_type  nb 
)
inline

Definition at line 1729 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::popn_front ( size_type  nb)
inline

Definition at line 1711 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::popn_front ( value_type dst,
size_type  nb 
)
inline

Definition at line 1724 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::push_back ( const value_type x)
inline

Definition at line 1648 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::push_front ( const value_type x)
inline

Definition at line 1641 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::pushn_back ( const value_type xs,
size_type  nb 
)
inline

Definition at line 1698 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
template<class Body >
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::pushn_back ( const Body &  body,
size_type  nb 
)
inline

Definition at line 1705 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::pushn_front ( const value_type xs,
size_type  nb 
)
inline

Definition at line 1691 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
segment_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::segment_by_index ( size_type  ix) const
inline

Definition at line 1771 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
size_type pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::size ( ) const
inline

Definition at line 1625 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::swap ( stack< Array_alloc, Item_alloc > &  other)
inline

Definition at line 1761 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::transfer_from_back_to_front ( stack< Array_alloc, Item_alloc > &  target,
size_type  nb 
)
inline

Definition at line 1734 of file fixedcapacitybase.hpp.

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
void pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::transfer_from_front_to_back ( stack< Array_alloc, Item_alloc > &  target,
size_type  nb 
)
inline

Definition at line 1742 of file fixedcapacitybase.hpp.

Member Data Documentation

template<class Array_alloc , class Item_alloc = std::allocator<typename Array_alloc::value_type>>
constexpr int pasl::data::fixedcapacity::base::stack< Array_alloc, Item_alloc >::capacity = Array_alloc::capacity
static

Definition at line 1589 of file fixedcapacitybase.hpp.


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