cesium-native 0.52.0
|
An iterator that wraps another iterator and applies a transformation function to each element as it is accessed. More...
#include <CesiumUtility/TransformIterator.h>
Classes | |
struct | pointer |
A pointer to the type being iterated over. More... | |
Public Types | |
using | iterator_category |
The iterator category tag denoting this iterator has the same category as the underlying iterator. | |
using | value_type |
The type of value that is being iterated over, which is the result of the transformation function applied to the underlying iterator's value. | |
using | difference_type |
The type used to identify distance between iterators, which for this iterator is the same as the underlying iterator's different_type . | |
Public Member Functions | |
TransformIterator (TTransformFunction transformFunction, TIterator iterator) | |
Creates a new instance. | |
value_type | operator* () const |
Returns the current item being iterated. This applies the transformation function to the current item of the underlying iterator. | |
pointer | operator-> () const |
Returns a pointer to the current item being iterated. This applies the transformation function to the current item of the underlying iterator. | |
TransformIterator & | operator++ () |
Advances the iterator to the next item (pre-incrementing). | |
TransformIterator | operator++ (int) |
Advances the iterator to the next item (post-incrementing). | |
bool | operator== (const TransformIterator &rhs) const |
Checks if two iterators are at the same item. | |
bool | operator!= (const TransformIterator &other) const |
Checks if two iterators are NOT at the same item. | |
An iterator that wraps another iterator and applies a transformation function to each element as it is accessed.
Definition at line 13 of file TransformIterator.h.
using CesiumUtility::TransformIterator< TTransformFunction, TIterator >::difference_type |
The type used to identify distance between iterators, which for this iterator is the same as the underlying iterator's different_type
.
Definition at line 34 of file TransformIterator.h.
using CesiumUtility::TransformIterator< TTransformFunction, TIterator >::iterator_category |
The iterator category tag denoting this iterator has the same category as the underlying iterator.
Definition at line 19 of file TransformIterator.h.
using CesiumUtility::TransformIterator< TTransformFunction, TIterator >::value_type |
The type of value that is being iterated over, which is the result of the transformation function applied to the underlying iterator's value.
Definition at line 26 of file TransformIterator.h.
|
inline |
Creates a new instance.
transformFunction | The function to apply to each element as it is accessed. This function must be callable with a single argument of the type being iterated over. |
iterator | The underlying iterator to wrap. |
Definition at line 65 of file TransformIterator.h.
|
inline |
Checks if two iterators are NOT at the same item.
Definition at line 111 of file TransformIterator.h.
|
inline |
Returns the current item being iterated. This applies the transformation function to the current item of the underlying iterator.
Definition at line 72 of file TransformIterator.h.
|
inline |
Advances the iterator to the next item (pre-incrementing).
Definition at line 87 of file TransformIterator.h.
|
inline |
Advances the iterator to the next item (post-incrementing).
Definition at line 95 of file TransformIterator.h.
|
inline |
Returns a pointer to the current item being iterated. This applies the transformation function to the current item of the underlying iterator.
Definition at line 80 of file TransformIterator.h.
|
inline |
Checks if two iterators are at the same item.
Definition at line 104 of file TransformIterator.h.