Audio Processing Framework (APF) version 0.5.0
|
Circular iterator class. More...
#include <apf/iterator.h>
Public Types | |
Type Definitions from the Underlying Iterator | |
using | iterator_category = typename std::iterator_traits< I >::iterator_category |
using | value_type = typename std::iterator_traits< I >::value_type |
using | difference_type = typename std::iterator_traits< I >::difference_type |
using | pointer = typename std::iterator_traits< I >::pointer |
using | reference = typename std::iterator_traits< I >::reference |
Public Member Functions | |
Constructors | |
Copy ctor and assignment operator are auto-generated by the compiler. | |
circular_iterator (I begin, I end, I current) | |
Constructor with explicit current iterator. More... | |
circular_iterator (I begin, I end) | |
Constructor with implicit current iterator. More... | |
circular_iterator (I begin) | |
Constructor from one iterator. More... | |
circular_iterator () | |
Default constructor. More... | |
Operators | |
operator<, operator<=, operator>, operator>= don't make sense! | |
self & | operator++ () |
Preincrement operator. More... | |
self & | operator-- () |
Predecrement operator. More... | |
self & | operator+= (difference_type n) |
Addition/assignment operator. More... | |
reference | operator* () const |
Straightforward dereference operator. More... | |
pointer | operator-> () const |
Straightforward arrow operator. More... | |
bool | operator== (const self &rhs) const |
Straightforward equality operator. More... | |
bool | operator!= (const self &rhs) const |
Unequality operator (using equality operator). More... | |
reference | operator[] (difference_type n) const |
Straightforward subscript operator (using + and dereference op). More... | |
self | operator++ (int) |
Postincrement operator (using preincrement operator). More... | |
self | operator-- (int) |
Postdecrement operator (using predecrement operator). More... | |
self | operator+ (difference_type n) const |
Addition operator (iterator plus integer, using +=). More... | |
self & | operator-= (difference_type n) |
Subtraction/assignment operator (using +=). More... | |
self | operator- (difference_type n) const |
Subtraction operator (using +=). More... | |
I | base () const |
Get the base iterator, inspired by std::reverse_iterator::base(). More... | |
difference_type | operator- (const self &lhs, const self &rhs) |
Difference operator. More... | |
self | operator+ (difference_type n, const self &it) |
Addition operator (integer plus iterator, using +=). More... | |
Circular iterator class.
Creates an iterator which can be infinitely iterated. When reaching the end of the range, it just starts again at the beginning. And vice versa.
I | the iterator type on which the circular iterator is based on. circular_iterator<I> has the same iterator_category as I itself. It only really works with random access iterators, however. |
Definition at line 671 of file iterator.h.
using apf::circular_iterator< I >::iterator_category = typename std::iterator_traits<I>::iterator_category |
Definition at line 679 of file iterator.h.
using apf::circular_iterator< I >::value_type = typename std::iterator_traits<I>::value_type |
Definition at line 681 of file iterator.h.
using apf::circular_iterator< I >::difference_type = typename std::iterator_traits<I>::difference_type |
Definition at line 682 of file iterator.h.
using apf::circular_iterator< I >::pointer = typename std::iterator_traits<I>::pointer |
Definition at line 683 of file iterator.h.
using apf::circular_iterator< I >::reference = typename std::iterator_traits<I>::reference |
Definition at line 684 of file iterator.h.
|
inline |
Constructor with explicit current iterator.
begin | begin of the original iterator range |
end | end of said range |
current | current iterator within the range |
Definition at line 695 of file iterator.h.
References apf::no_nullptr().
|
inline |
Constructor with implicit current iterator.
begin | begin of the original iterator range |
end | end of said range |
Definition at line 709 of file iterator.h.
References apf::no_nullptr().
|
inlineexplicit |
Constructor from one iterator.
begin | begin of the original iterator range |
Definition at line 724 of file iterator.h.
References apf::no_nullptr().
|
inline |
Default constructor.
Definition at line 736 of file iterator.h.
|
inline |
|
inline |
|
inline |
Addition/assignment operator.
Definition at line 770 of file iterator.h.
References apf::no_nullptr(), and apf::math::wrap().
|
inline |
Straightforward dereference operator.
Definition at line 810 of file iterator.h.
|
inline |
Straightforward arrow operator.
Definition at line 811 of file iterator.h.
|
inline |
Straightforward equality operator.
Definition at line 812 of file iterator.h.
|
inline |
Unequality operator (using equality operator).
Definition at line 813 of file iterator.h.
|
inline |
Straightforward subscript operator (using + and dereference op).
Definition at line 814 of file iterator.h.
|
inline |
Postincrement operator (using preincrement operator).
Definition at line 815 of file iterator.h.
|
inline |
Postdecrement operator (using predecrement operator).
Definition at line 816 of file iterator.h.
|
inline |
Addition operator (iterator plus integer, using +=).
Definition at line 817 of file iterator.h.
|
inline |
Subtraction/assignment operator (using +=).
Definition at line 817 of file iterator.h.
|
inline |
Subtraction operator (using +=).
Definition at line 817 of file iterator.h.
|
inline |
Get the base iterator, inspired by std::reverse_iterator::base().
Definition at line 821 of file iterator.h.
Difference operator.
lhs | the iterator to the left of the minus sign |
rhs | the iterator on the right side |
Definition at line 791 of file iterator.h.
Addition operator (integer plus iterator, using +=).
Definition at line 817 of file iterator.h.