chain_range_iterator Class Reference

#include <indirect_range_iterator.h>

Inheritance diagram for chain_range_iterator:
abstract_range_iterator

Public Member Functions

 chain_range_iterator (abstract_range_iterator *it1=0, abstract_range_iterator *it2=0)
 
template<int N>
 chain_range_iterator (abstract_range_iterator *(&iterators)[N], size_t current=0, size_t dummy=0)
 
virtual ~chain_range_iterator ()
 
 chain_range_iterator (const chain_range_iterator &other)
 
chain_range_iteratoroperator= (const chain_range_iterator &other)
 
void reset ()
 
void advance ()
 
bool is_done () const
 
- Public Member Functions inherited from abstract_range_iterator
virtual ~abstract_range_iterator ()
 
abstract_range_iteratoroperator++ ()
 
void operator() ()
 
 operator bool () const
 

Detailed Description

Chain iterators into a recursive loop

Note
this class cannot be copied, data is moved!

Constructor & Destructor Documentation

Constructor

Parameters
it1iterator to first range
it2iterator to second range
chain_range_iterator ( abstract_range_iterator *(&)  iterators[N],
size_t  current = 0,
size_t  dummy = 0 
)
inline

Constructor

Parameters
iteratorsarray of iterators
currentcurrent index to iterator
dummynot used
Returns
virtual ~chain_range_iterator ( )
inlinevirtual

Destructor

chain_range_iterator ( const chain_range_iterator other)
inline

Move constructor

Note
No copy is performed! Data is moved!
Parameters
otherchain iterator to move data from

Member Function Documentation

void advance ( )
inlinevirtual

Advance the iterator to the next element in the range

Implements abstract_range_iterator.

bool is_done ( ) const
inlinevirtual

Test if you are at the end of the range

Returns
true if you are done iterating, reached the end of the range

Implements abstract_range_iterator.

chain_range_iterator& operator= ( const chain_range_iterator other)
inline

Move assignment operator

Note
No copy is performed! Data is moved!
Parameters
otherchain iterator to move data from
Returns
reference to this object
void reset ( )
inlinevirtual

Reset the iterator to the start of the range

Implements abstract_range_iterator.


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