STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator Class Reference

Detailed Description

template<class ExternalArrayType>
class stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator

An iterator which can be used to write (and read) an external_array via an external_array_writer. See the documentation of external_array_writer.

Definition at line 1323 of file parallel_priority_queue.h.

+ Collaboration diagram for stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator:

Public Types

typedef ptrdiff_t difference_type
 
typedef ExternalArrayType ea_type
 
typedef
std::random_access_iterator_tag 
iterator_category
 
typedef value_typepointer
 
typedef value_typereference
 
typedef iterator self_type
 
typedef ea_type::value_type value_type
 
typedef external_array_writer writer_type
 

Public Member Functions

 iterator ()
 default constructor (should not be used directly) More...
 
 iterator (writer_type *writer, external_size_type index)
 construct a new iterator More...
 
 iterator (const iterator &other)
 copy an iterator, the new iterator is not automatically live! More...
 
 ~iterator ()
 
external_size_type get_index () const
 return the current absolute index inside the external array. More...
 
void make_live ()
 allocates a reference to the block's data (possibly reading it from EM). More...
 
bool operator!= (const self_type &o) const
 
reference operator* ()
 access the current item More...
 
self_type operator+ (difference_type addend) const
 
self_typeoperator++ ()
 prefix-increment operator More...
 
self_type operator- (difference_type subtrahend) const
 
difference_type operator- (const self_type &o) const
 
pointer operator-> ()
 access the current item More...
 
bool operator< (const self_type &o) const
 
bool operator<= (const self_type &o) const
 
iteratoroperator= (const iterator &other)
 assign an iterator, the assigned iterator is not automatically live! More...
 
bool operator== (const self_type &o) const
 
bool operator> (const self_type &o) const
 
bool operator>= (const self_type &o) const
 

Static Public Attributes

static const size_t block_items = ea_type::block_items
 
static const bool debug = false
 scope based debug variable More...
 

Protected Attributes

block_typem_block
 pointer to the referenced block. undefined while m_live is false. More...
 
internal_size_type m_block_index
 index of the current element's block in the external array's block list. undefined while m_live is false. More...
 
internal_size_type m_current
 pointer to the current element inside the referenced block. undefined while m_live is false. More...
 
external_size_type m_index
 index of the current element, absolute in the external array More...
 
bool m_live
 when operator* or operator-> are called, then the iterator goes live and allocates a reference to the block's data (possibly reading it from EM). More...
 
writer_typem_writer
 pointer to the external array containing the elements More...
 

Member Typedef Documentation

template<class ExternalArrayType >
typedef ptrdiff_t stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::difference_type

Definition at line 1332 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef ExternalArrayType stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::ea_type

Definition at line 1327 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef std::random_access_iterator_tag stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::iterator_category

Definition at line 1333 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef value_type* stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::pointer

Definition at line 1331 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef value_type& stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::reference

Definition at line 1330 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef iterator stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::self_type

Definition at line 1335 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef ea_type::value_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::value_type

Definition at line 1329 of file parallel_priority_queue.h.

template<class ExternalArrayType >
typedef external_array_writer stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::writer_type

Definition at line 1326 of file parallel_priority_queue.h.

Constructor & Destructor Documentation

template<class ExternalArrayType >
stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::iterator ( )
inline

default constructor (should not be used directly)

Definition at line 1367 of file parallel_priority_queue.h.

template<class ExternalArrayType >
stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::iterator ( writer_type writer,
external_size_type  index 
)
inline

construct a new iterator

Definition at line 1372 of file parallel_priority_queue.h.

References STXXL_DEBUG.

template<class ExternalArrayType >
stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::iterator ( const iterator other)
inline

copy an iterator, the new iterator is not automatically live!

Definition at line 1381 of file parallel_priority_queue.h.

References STXXL_DEBUG.

template<class ExternalArrayType >
stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::~iterator ( )
inline

Definition at line 1407 of file parallel_priority_queue.h.

References STXXL_DEBUG.

Member Function Documentation

template<class ExternalArrayType >
external_size_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::get_index ( ) const
inline

return the current absolute index inside the external array.

Definition at line 1418 of file parallel_priority_queue.h.

template<class ExternalArrayType >
void stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::make_live ( )
inline

allocates a reference to the block's data (possibly reading it from EM).

Definition at line 1425 of file parallel_priority_queue.h.

References STXXL_DEBUG.

template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator!= ( const self_type o) const
inline
template<class ExternalArrayType >
reference stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator* ( )
inline

access the current item

Definition at line 1443 of file parallel_priority_queue.h.

References UNLIKELY.

template<class ExternalArrayType >
self_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator+ ( difference_type  addend) const
inline

Definition at line 1474 of file parallel_priority_queue.h.

template<class ExternalArrayType >
self_type& stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator++ ( )
inline

prefix-increment operator

Definition at line 1458 of file parallel_priority_queue.h.

References LIKELY, and UNLIKELY.

template<class ExternalArrayType >
self_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator- ( difference_type  subtrahend) const
inline

Definition at line 1478 of file parallel_priority_queue.h.

template<class ExternalArrayType >
difference_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator- ( const self_type o) const
inline
template<class ExternalArrayType >
pointer stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator-> ( )
inline

access the current item

Definition at line 1452 of file parallel_priority_queue.h.

template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator< ( const self_type o) const
inline
template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator<= ( const self_type o) const
inline
template<class ExternalArrayType >
iterator& stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator= ( const iterator other)
inline
template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator== ( const self_type o) const
inline
template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator> ( const self_type o) const
inline
template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator>= ( const self_type o) const
inline

Member Data Documentation

template<class ExternalArrayType >
const size_t stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::block_items = ea_type::block_items
static

Definition at line 1337 of file parallel_priority_queue.h.

template<class ExternalArrayType >
const bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::debug = false
static

scope based debug variable

Definition at line 1340 of file parallel_priority_queue.h.

template<class ExternalArrayType >
block_type* stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::m_block
protected

pointer to the referenced block. undefined while m_live is false.

Definition at line 1359 of file parallel_priority_queue.h.

template<class ExternalArrayType >
internal_size_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::m_block_index
protected

index of the current element's block in the external array's block list. undefined while m_live is false.

Definition at line 1356 of file parallel_priority_queue.h.

template<class ExternalArrayType >
internal_size_type stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::m_current
protected

pointer to the current element inside the referenced block. undefined while m_live is false.

Definition at line 1363 of file parallel_priority_queue.h.

template<class ExternalArrayType >
bool stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::m_live
protected

when operator* or operator-> are called, then the iterator goes live and allocates a reference to the block's data (possibly reading it from EM).

Definition at line 1349 of file parallel_priority_queue.h.

template<class ExternalArrayType >
writer_type* stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::m_writer
protected

pointer to the external array containing the elements

Definition at line 1344 of file parallel_priority_queue.h.

Referenced by stxxl::ppq_local::external_array_writer< ExternalArrayType >::iterator::operator=().


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