|
swift
|
Iterator wrapper which applies some transformation function to each element. More...
#include <iterator.h>
Public Types | |
| using | undecayed_type |
| The type returned by the transformation function, which may or may not be a reference. | |
| using | pointer |
| The type returned by this iterator's arrow operator, which may be a pointer or a pointer-like wrapper object. | |
| using | iterator_category = std::forward_iterator_tag |
| Types. | |
| using | value_type |
| Types. | |
| using | difference_type = typename std::iterator_traits<I>::difference_type |
| Types. | |
| using | reference = typename std::iterator_traits<I>::reference |
| Types. | |
Public Member Functions | |
| TransformIterator (I iterator, F function) | |
| Constructor. | |
| TransformIterator (I end) | |
| Implicit conversion from an end iterator. | |
| undecayed_type | operator* () |
| Dereference operator, returns the transformed object reference by the iterator. Undefined if iterator is at the end. | |
| pointer | operator-> () |
| Indirection operator, returns a pointer to the transformed object, or a pointer-like wrapper object if the transformation function returns by value. Undefined if iterator is at the end. | |
| TransformIterator & | operator++ () |
| Advance to the next element. Undefined if iterator is at the end. | |
| TransformIterator | operator++ (int) |
| Advance to the next element. Undefined if iterator is at the end. | |
| bool | operator== (const TransformIterator &other) const |
| Comparison operators. | |
| bool | operator!= (const TransformIterator &other) const |
| Comparison operators. | |
| bool | operator< (const TransformIterator &other) const |
| Comparison operators. | |
| bool | operator<= (const TransformIterator &other) const |
| Comparison operators. | |
| bool | operator> (const TransformIterator &other) const |
| Comparison operators. | |
| bool | operator>= (const TransformIterator &other) const |
| Comparison operators. | |
Iterator wrapper which applies some transformation function to each element.
By creating a CRange from such iterators, it is possible to perform a transformation on a container without copying elements.
Definition at line 107 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::difference_type = typename std::iterator_traits<I>::difference_type |
Types.
Definition at line 115 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::iterator_category = std::forward_iterator_tag |
Types.
Definition at line 112 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::pointer |
The type returned by this iterator's arrow operator, which may be a pointer or a pointer-like wrapper object.
Definition at line 137 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::reference = typename std::iterator_traits<I>::reference |
Types.
Definition at line 116 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::undecayed_type |
The type returned by the transformation function, which may or may not be a reference.
Definition at line 120 of file iterator.h.
| using swift::misc::Iterators::TransformIterator< I, F >::value_type |
Types.
Definition at line 113 of file iterator.h.
|
inline |
Constructor.
Definition at line 141 of file iterator.h.
|
inline |
Implicit conversion from an end iterator.
Definition at line 144 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 183 of file iterator.h.
|
inline |
Dereference operator, returns the transformed object reference by the iterator. Undefined if iterator is at the end.
Definition at line 164 of file iterator.h.
|
inline |
Advance to the next element. Undefined if iterator is at the end.
Definition at line 149 of file iterator.h.
|
inline |
Advance to the next element. Undefined if iterator is at the end.
Definition at line 154 of file iterator.h.
|
inline |
Indirection operator, returns a pointer to the transformed object, or a pointer-like wrapper object if the transformation function returns by value. Undefined if iterator is at the end.
Definition at line 173 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 184 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 185 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 182 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 186 of file iterator.h.
|
inline |
Comparison operators.
Definition at line 187 of file iterator.h.