Audio Processing Framework (APF) version 0.5.0
|
Iterator that casts items to T*
on dereferenciation.
More...
#include <apf/iterator.h>
Public Types | |
using | value_type = T |
using | pointer = T * |
using | reference = T & |
using | difference_type = typename std::iterator_traits< I >::difference_type |
using | iterator_category = typename std::iterator_traits< I >::iterator_category |
Public Member Functions | |
cast_iterator (I base_iterator) | |
Constructor from base iterator. More... | |
cast_iterator () | |
Default constructor. More... | |
reference | operator* () const |
Dereference operator. More... | |
pointer | operator-> () const |
Arrow operator. More... | |
reference | operator[] (difference_type n) const |
Subscript 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... | |
self | operator-- (int) |
Postdecrement operator (using predecrement operator). More... | |
bool | operator!= (const self &rhs) const |
Unequality operator (using equality 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 that casts items to T*
on dereferenciation.
There is an extra dereference inside the dereference operator, similar to boost::indirect_iterator
(http://boost.org/doc/libs/release/libs/iterator/doc/indirect_iterator.html). But before that, the pointer is casted to the desired type T
.
T | Pointee type to be casted to |
I | Base iterator type |
value_type
of I
must be a pointer to a compatible type! Definition at line 523 of file iterator.h.
using apf::cast_iterator< T, I >::value_type = T |
Definition at line 529 of file iterator.h.
using apf::cast_iterator< T, I >::pointer = T* |
Definition at line 530 of file iterator.h.
using apf::cast_iterator< T, I >::reference = T& |
Definition at line 531 of file iterator.h.
using apf::cast_iterator< T, I >::difference_type = typename std::iterator_traits<I>::difference_type |
Definition at line 532 of file iterator.h.
using apf::cast_iterator< T, I >::iterator_category = typename std::iterator_traits<I>::iterator_category |
Definition at line 533 of file iterator.h.
|
inlineexplicit |
Constructor from base iterator.
base_iterator | base iterator |
Definition at line 536 of file iterator.h.
|
inline |
Default constructor.
Definition at line 536 of file iterator.h.
|
inline |
Dereference operator.
T
. Definition at line 542 of file iterator.h.
References apf::no_nullptr().
|
inline |
Arrow operator.
T
. Definition at line 550 of file iterator.h.
References apf::no_nullptr().
|
inline |
Subscript operator.
n | index |
T
. Definition at line 560 of file iterator.h.
References apf::no_nullptr().
|
inline |
Straightforward equality operator.
Definition at line 567 of file iterator.h.
|
inline |
Straightforward preincrement operator.
Definition at line 569 of file iterator.h.
|
inline |
Straightforward predecrement operator.
Definition at line 570 of file iterator.h.
|
inline |
Straightforward addition/assignment operator.
Definition at line 571 of file iterator.h.
|
inline |
Postincrement operator (using preincrement operator).
Definition at line 573 of file iterator.h.
|
inline |
Postdecrement operator (using predecrement operator).
Definition at line 574 of file iterator.h.
|
inline |
Unequality operator (using equality operator).
Definition at line 575 of file iterator.h.
|
inline |
Addition operator (iterator plus integer, using +=).
Definition at line 577 of file iterator.h.
|
inline |
Subtraction/assignment operator (using +=).
Definition at line 577 of file iterator.h.
|
inline |
Subtraction operator (using +=).
Definition at line 577 of file iterator.h.
|
inline |
Get the base iterator, inspired by std::reverse_iterator::base().
Definition at line 579 of file iterator.h.
Straightforward less-than operator.
Definition at line 568 of file iterator.h.
|
friend |
Straightforward difference operator.
Definition at line 572 of file iterator.h.
Straightforward greater-than operator (using less-than operator).
Definition at line 576 of file iterator.h.
Straightforward less-or-equal operator (using less-than operator).
Definition at line 576 of file iterator.h.
Straightforward greater-or-equal operator (using less-than operator).
Definition at line 576 of file iterator.h.
Addition operator (integer plus iterator, using +=).
Definition at line 577 of file iterator.h.