Audio Processing Framework (APF) version 0.5.0
Classes | Public Types | Public Member Functions | List of all members
apf::dual_iterator< I1, I2 > Class Template Reference

Iterate over two iterators at once. More...

#include <apf/iterator.h>

Classes

class  output_proxy
 Helper class for dual_iterator. More...
 

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = std::pair< typename std::iterator_traits< I1 >::value_type, typename std::iterator_traits< I2 >::value_type >
 
using reference = output_proxy
 
using difference_type = std::ptrdiff_t
 
using pointer = void
 

Public Member Functions

 dual_iterator (I1 i1, I2 i2)
 Constructor from two iterators. More...
 
reference operator* ()
 Dereference operator. More...
 
selfoperator++ ()
 Pre-increment operator. More...
 
bool operator== (const self &rhs) const
 Equality operator. More...
 
self operator++ (int)
 Postincrement operator (using preincrement operator). More...
 
bool operator!= (const self &rhs) const
 Unequality operator (using equality operator). More...
 

Detailed Description

template<typename I1, typename I2 = I1>
class apf::dual_iterator< I1, I2 >

Iterate over two iterators at once.

For now, the dual_iterator has the features of a forward iterator, but it could be upgraded if need should arise.

dual_iterator has some special features (see output_proxy):

Definition at line 1209 of file iterator.h.

Member Typedef Documentation

◆ iterator_category

template<typename I1 , typename I2 = I1>
using apf::dual_iterator< I1, I2 >::iterator_category = std::forward_iterator_tag

Definition at line 1217 of file iterator.h.

◆ value_type

template<typename I1 , typename I2 = I1>
using apf::dual_iterator< I1, I2 >::value_type = std::pair<typename std::iterator_traits<I1>::value_type , typename std::iterator_traits<I2>::value_type>

Definition at line 1219 of file iterator.h.

◆ reference

template<typename I1 , typename I2 = I1>
using apf::dual_iterator< I1, I2 >::reference = output_proxy

Definition at line 1223 of file iterator.h.

◆ difference_type

template<typename I1 , typename I2 = I1>
using apf::dual_iterator< I1, I2 >::difference_type = std::ptrdiff_t

Definition at line 1225 of file iterator.h.

◆ pointer

template<typename I1 , typename I2 = I1>
using apf::dual_iterator< I1, I2 >::pointer = void

Definition at line 1226 of file iterator.h.

Constructor & Destructor Documentation

◆ dual_iterator()

template<typename I1 , typename I2 = I1>
apf::dual_iterator< I1, I2 >::dual_iterator ( I1  i1,
I2  i2 
)
inline

Constructor from two iterators.

Definition at line 1231 of file iterator.h.

Member Function Documentation

◆ operator*()

template<typename I1 , typename I2 = I1>
reference apf::dual_iterator< I1, I2 >::operator* ( )
inline

Dereference operator.

Returns
a temporary object of type output_proxy

Definition at line 1235 of file iterator.h.

References apf::no_nullptr().

◆ operator++() [1/2]

template<typename I1 , typename I2 = I1>
self & apf::dual_iterator< I1, I2 >::operator++ ( )
inline

Pre-increment operator.

Definition at line 1244 of file iterator.h.

References apf::no_nullptr().

◆ operator==()

template<typename I1 , typename I2 = I1>
bool apf::dual_iterator< I1, I2 >::operator== ( const self rhs) const
inline

Equality operator.

Definition at line 1253 of file iterator.h.

◆ operator++() [2/2]

template<typename I1 , typename I2 = I1>
self apf::dual_iterator< I1, I2 >::operator++ ( int  )
inline

Postincrement operator (using preincrement operator).

Definition at line 1258 of file iterator.h.

◆ operator!=()

template<typename I1 , typename I2 = I1>
bool apf::dual_iterator< I1, I2 >::operator!= ( const self rhs) const
inline

Unequality operator (using equality operator).

Definition at line 1259 of file iterator.h.


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