Generic Image Library: position_iterator< Deref, Dim > Struct Template Reference

###  | #  |

Public Types | Public Member Functions | Friends | List of all members
position_iterator< Deref, Dim > Struct Template Reference
Pixel Iterator » Models » position_iterator | PixelBased » Models

An iterator that remembers its current X,Y position and invokes a function object with it upon dereferencing. Used to create virtual image views. Models: StepIteratorConcept, PixelIteratorConcept, PixelBasedConcept, HasDynamicXStepTypeConcept. More...

`#include <position_iterator.hpp>`

## Public Types
using | parent_t
using | difference_type = typename parent_t::difference_type
using | reference = typename parent_t::reference
using | point_t = typename Deref::argument_type

## Public Member Functions
| position_iterator (point_t const &p, point_t const &step, Deref const &d)
| position_iterator (position_iterator const &p)
template<typename D >
| position_iterator (position_iterator< D, Dim > const &p)
auto | operator= (position_iterator const &p) -> position_iterator &
auto | pos () const -> point_t const &
auto | step () const -> point_t const &
auto | deref_fn () const -> Deref const &
void | set_step (difference_type s)
auto | operator[] (difference_type d) const -> reference

## Friends
class | boost::iterator_core_access

## Detailed Description

template<typename Deref, int Dim>
struct boost::gil::position_iterator< Deref, Dim >

An iterator that remembers its current X,Y position and invokes a function object with it upon dereferencing. Used to create virtual image views. Models: StepIteratorConcept, PixelIteratorConcept, PixelBasedConcept, HasDynamicXStepTypeConcept.

Template Parameters

  Deref | A function object that given a point returns a pixel reference. Models PixelDereferenceAdaptorConcept
  Dim | Dimension to advance along

## Member Typedef Documentation

## ◆ parent_t

template<typename Deref , int Dim>

using parent_t

Initial value:
iterator_facade<position_iterator<Deref,Dim>,
typename Deref::value_type,
std::random_access_iterator_tag,
typename Deref::reference,
typename Deref::argument_type::template axis<Dim>::coord_t>

## Member Function Documentation

## ◆ operator[]()

template<typename Deref , int Dim>

auto operator[] | ( | difference_type | d | ) | const -> reference
| inline

For some reason operator[] provided by iterator_adaptor returns a custom class that is convertible to reference We require our own reference because it is registered in iterator_traits

The documentation for this struct was generated from the following file:

- position_iterator.hpp