Wrapping iterator that invokes a functor on dereference.
Synopsis
Declared in <bdlb_transformiterator.h>
template<
class FUNCTOR,
class ITERATOR>
class TransformIterator
: public TransformIterator_AllocatorOfIteratorMethod<TransformIterator<FUNCTOR, ITERATOR>, bslma::UsesBslmaAllocator<ITERATOR>::value>
, public TransformIterator_AllocatorOfFunctorMethod<TransformIterator<FUNCTOR, ITERATOR>, !bslma::UsesBslmaAllocator<ITERATOR>::value && bslma::UsesBslmaAllocator<FUNCTOR>::value>
Description
The transform iterator class itself. Its job is to hold a functor and an iterator, pass through all iterator‐related operations to the held iterator, and on dereference, call the functor on the result of dereferencing the iterator and return the result of the call instead.
Base Classes
Name |
Description |
Base class template that optionally provides an |
|
Base class template that optionally provides an |
Type Aliases
Name |
Description |
Type used to represent distances between iterators. |
|
Iterator category of this transform iterator. |
|
Pointer type for this iterator. |
|
Reference type returned by dereferencing this iterator. |
|
Value type produced by dereferencing this iterator. |
Member Functions
Name |
Description |
|
Constructors |
Assign to this object the value of the specified |
|
|
|
|
|
Return the result of applying this object's functor to |
|
Increment this iterator and return a reference to it. |
|
Advance this iterator by the specified |
|
Decrement this iterator and return a reference to it. |
|
Regress this iterator by the specified |
|
Return the address of the transformed current element. |
|
Return the transformed element at the specified offset. |
|
Exchange the value of this object with that of |
|
Nested trait declaration for |
Non-Member Functions
Name |
Description |
Return |
|
Return a copy of |
|
Return a copy of |
|
Increment |
|
Return the distance from the underlying iterator of |
|
Return a copy of |
|
Decrement |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Efficiently exchange the values of the specified |
Created with MrDocs