Calico
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups
cal::transform_iterator< InputIterator, UnaryOperation > Struct Template Reference

An iterator that applies a function to each element. More...

#include <iterator.hpp>

Public Types

typedef auto difference_type
 Difference type.
 
typedef InputIterator iterator
 Underlying iterator type.
 
typedef auto iterator_category
 Iterator category.
 
typedef auto pointer
 Pointer type.
 
typedef value_type reference
 Reference type.
 
typedef auto value_type
 Value type.
 

Public Member Functions

 transform_iterator ()
 Default initializer.
 
 transform_iterator (const iterator &it, const UnaryOperation &op)
 Constructs an iterator that applies a function to each element.
 
const iteratorbase () const
 Returns the underlying iterator.
 
const UnaryOperation & function () const
 Returns the function object.
 
reference operator* () const
 Returns the pointed-to object.
 
transform_iteratoroperator++ ()
 Pre-increments the iterator.
 
transform_iterator operator++ (int)
 Post-increments the iterator.
 
transform_iteratoroperator+= (difference_type n)
 Advances the iterator by n.
 
transform_iteratoroperator-- ()
 Pre-decrements the iterator.
 
transform_iterator operator-- (int)
 Post-decrements the iterator.
 
transform_iteratoroperator-= (difference_type n)
 Advances the iterator by n in reverse.
 
pointer operator-> () const
 Member access of the object pointed to by the iterator.
 

Detailed Description

template<class InputIterator, class UnaryOperation>
struct cal::transform_iterator< InputIterator, UnaryOperation >

An iterator that applies a function to each element.