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.
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>
Base Classes
Name |
Description |
The |
|
The |
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 the functor of this object to the result of dereferencing the underlying iterator. The behavior is undefined if dereferencing the underlying iterator is undefined. Note that the behavior of this method is equivalent to: ` functor()(*iterator()) ` |
|
Increment the underlying iterator of this object, and return a reference providing modifiable access to this object. The behavior is undefined if incrementing the underlying iterator is undefined. |
|
Advance the underlying iterator of this object by the specified (signed) |
|
Decrement the underlying iterator of this object, and return a reference providing modifiable access to this object. The behavior is undefined if decrementing the underlying iterator is undefined. |
|
Regress the underlying iterator of this object by the specified (signed) |
|
Return the address of the result of applying the functor of this object to the result of dereferencing the underlying iterator. The behavior is undefined if dereferencing the underlying iterator is undefined. Note that the behavior of this method is equivalent to: ` &functor()(*iterator()) ` Also note that the functor must return a reference type for this method to be used. |
|
Return the result of applying the functor of this object to the result of dereferencing the underlying iterator advanced by the specified (signed) |
|
Efficiently exchange the value of this object with the value of the specified |
|
Nested trait declaration for |
Non-Member Functions
Name |
Description |
Return |
|
Return a copy of the specified |
|
Return a copy of the specified |
|
Increment the underlying iterator of the specified |
|
Return the result of subtracting the underlying iterator of the specified |
|
Return a copy of the specified |
|
Decrement the underlying iterator of the specified |
|
Return |
|
Return |
|
Return |
|
Return |
|
Return |
|
Efficiently exchange the values of the specified |
Created with MrDocs