Audio Processing Framework (APF) version 0.5.0
|
Iterator adaptor with a function call at dereferenciation. More...
#include <apf/iterator.h>
Public Types | |
using | iterator_category = typename std::iterator_traits< I >::iterator_category |
using | reference = typename std::result_of< _signature >::type |
Can be a reference, but doesn't necessarily have to. More... | |
using | value_type = typename std::remove_reference< reference >::type |
using | pointer = value_type * |
using | difference_type = typename std::iterator_traits< I >::difference_type |
Public Member Functions | |
transform_iterator (I base_iterator=I(), F f=F()) | |
Constructor. More... | |
reference | operator* () |
Dereference operator. More... | |
pointer | operator-> () |
Arrow operator. More... | |
bool | operator== (const self &rhs) const |
Straightforward equality operator. More... | |
self & | operator++ () |
Straightforward preincrement operator. More... | |
self & | operator-- () |
Straightforward predecrement operator. More... | |
self & | operator+= (difference_type n) |
Straightforward addition/assignment operator. More... | |
self | operator++ (int) |
Postincrement operator (using preincrement 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) |
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... | |
Friends | |
bool | operator< (const self &lhs, const self &rhs) |
Straightforward less-than operator. More... | |
difference_type | operator- (const self &lhs, const self &rhs) |
Straightforward difference operator. More... | |
bool | operator> (const self &lhs, const self &rhs) |
Straightforward greater-than operator (using less-than operator). More... | |
bool | operator<= (const self &lhs, const self &rhs) |
Straightforward less-or-equal operator (using less-than operator). More... | |
bool | operator>= (const self &lhs, const self &rhs) |
Straightforward greater-or-equal operator (using less-than operator). More... | |
self | operator+ (difference_type n, const self &it) |
Addition operator (integer plus iterator, using +=). More... | |
Iterator adaptor with a function call at dereferenciation.
I | type of base iterator |
F | Unary function object which takes an I::value_type . Example: math::raised_cosine |
F
can be any type, but operator->() only works if it is a reference! If it's not a reference, you will get an error similar to this: Definition at line 876 of file iterator.h.
using apf::transform_iterator< I, F >::iterator_category = typename std::iterator_traits<I>::iterator_category |
Definition at line 884 of file iterator.h.
using apf::transform_iterator< I, F >::reference = typename std::result_of<_signature>::type |
Can be a reference, but doesn't necessarily have to.
Definition at line 887 of file iterator.h.
using apf::transform_iterator< I, F >::value_type = typename std::remove_reference<reference>::type |
Definition at line 888 of file iterator.h.
using apf::transform_iterator< I, F >::pointer = value_type* |
Definition at line 889 of file iterator.h.
using apf::transform_iterator< I, F >::difference_type = typename std::iterator_traits<I>::difference_type |
Definition at line 890 of file iterator.h.
|
inlineexplicit |
Constructor.
Definition at line 893 of file iterator.h.
|
inline |
Dereference operator.
Dereference the base iterator, use it as argument to the stored function and return the result.
Definition at line 902 of file iterator.h.
|
inline |
Arrow operator.
Dereference the base iterator, use it as argument to the stored function and return the address of the result.
F
is a reference! Definition at line 908 of file iterator.h.
References apf::accumulating_iterator< I >::operator*().
|
inline |
Straightforward equality operator.
Definition at line 913 of file iterator.h.
|
inline |
Straightforward preincrement operator.
Definition at line 914 of file iterator.h.
|
inline |
Straightforward predecrement operator.
Definition at line 916 of file iterator.h.
|
inline |
Straightforward addition/assignment operator.
Definition at line 917 of file iterator.h.
|
inline |
Postincrement operator (using preincrement operator).
Definition at line 919 of file iterator.h.
|
inline |
Unequality operator (using equality operator).
Definition at line 920 of file iterator.h.
|
inline |
Straightforward subscript operator (using + and dereference op).
Definition at line 921 of file iterator.h.
|
inline |
Postdecrement operator (using predecrement operator).
Definition at line 922 of file iterator.h.
|
inline |
Addition operator (iterator plus integer, using +=).
Definition at line 924 of file iterator.h.
|
inline |
Subtraction/assignment operator (using +=).
Definition at line 924 of file iterator.h.
|
inline |
Subtraction operator (using +=).
Definition at line 924 of file iterator.h.
|
inline |
Get the base iterator, inspired by std::reverse_iterator::base().
Definition at line 926 of file iterator.h.
Straightforward less-than operator.
Definition at line 915 of file iterator.h.
|
friend |
Straightforward difference operator.
Definition at line 918 of file iterator.h.
Straightforward greater-than operator (using less-than operator).
Definition at line 923 of file iterator.h.
Straightforward less-or-equal operator (using less-than operator).
Definition at line 923 of file iterator.h.
Straightforward greater-or-equal operator (using less-than operator).
Definition at line 923 of file iterator.h.
Addition operator (integer plus iterator, using +=).
Definition at line 924 of file iterator.h.