Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::gil::memory_based_step_iterator< Iterator > Class Template Reference

MEMORY-BASED STEP ITERATOR. More...

#include <step_iterator.hpp>

Inheritance diagram for boost::gil::memory_based_step_iterator< Iterator >:
Collaboration diagram for boost::gil::memory_based_step_iterator< Iterator >:

Public Types

typedef
detail::step_iterator_adaptor
< memory_based_step_iterator
< Iterator >, Iterator,
memunit_step_fn< Iterator > > 
parent_t
 
typedef parent_t::reference reference
 
typedef parent_t::difference_type difference_type
 
typedef Iterator x_iterator
 
typedef std::iterator_traits
< Iterator >::difference_type 
base_difference_type
 

Public Member Functions

 memory_based_step_iterator ()
 
 memory_based_step_iterator (Iterator it, std::ptrdiff_t memunit_step)
 
template<typename I2 >
 memory_based_step_iterator (const memory_based_step_iterator< I2 > &it)
 
reference operator[] (difference_type d) const
 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. More...
 
void set_step (std::ptrdiff_t memunit_step)
 
x_iteratorbase ()
 
x_iterator const & base () const
 
difference_type step () const
 

Protected Attributes

memunit_step_fn< Iterator > _step_fn
 

Detailed Description

template<typename Iterator>
class boost::gil::memory_based_step_iterator< Iterator >

MEMORY-BASED STEP ITERATOR.

Iterator with dynamically specified step in memory units (bytes or bits). Models StepIteratorConcept, IteratorAdaptorConcept, MemoryBasedIteratorConcept, PixelIteratorConcept, HasDynamicXStepTypeConcept

A refinement of step_iterator_adaptor that uses a dynamic parameter for the step which is specified in memory units, such as bytes or bits

Pixel step iterators are used to provide iteration over non-adjacent pixels. Common use is a vertical traversal, where the step is the row stride.

Another application is as a sub-channel view. For example, a red intensity image over interleaved RGB data would use a step iterator adaptor with step sizeof(channel_t)*3 In the latter example the step size could be fixed at compile time for efficiency. Compile-time fixed step can be implemented by providing a step function object that takes the step as a template

Member Typedef Documentation

typedef std::iterator_traits<Iterator>::difference_type boost::gil::detail::step_iterator_adaptor< memory_based_step_iterator< Iterator > , Iterator, memunit_step_fn< Iterator > >::base_difference_type
inherited
template<typename Iterator>
typedef parent_t::difference_type boost::gil::memory_based_step_iterator< Iterator >::difference_type
template<typename Iterator>
typedef detail::step_iterator_adaptor<memory_based_step_iterator<Iterator>, Iterator, memunit_step_fn<Iterator> > boost::gil::memory_based_step_iterator< Iterator >::parent_t
template<typename Iterator>
typedef parent_t::reference boost::gil::memory_based_step_iterator< Iterator >::reference
template<typename Iterator>
typedef Iterator boost::gil::memory_based_step_iterator< Iterator >::x_iterator

Constructor & Destructor Documentation

template<typename Iterator>
boost::gil::memory_based_step_iterator< Iterator >::memory_based_step_iterator ( )
inline
template<typename Iterator>
boost::gil::memory_based_step_iterator< Iterator >::memory_based_step_iterator ( Iterator  it,
std::ptrdiff_t  memunit_step 
)
inline
template<typename Iterator>
template<typename I2 >
boost::gil::memory_based_step_iterator< Iterator >::memory_based_step_iterator ( const memory_based_step_iterator< I2 > &  it)
inline

Member Function Documentation

template<typename Iterator>
x_iterator const& boost::gil::memory_based_step_iterator< Iterator >::base ( ) const
inline
template<typename Iterator>
reference boost::gil::memory_based_step_iterator< Iterator >::operator[] ( difference_type  d) const
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.

template<typename Iterator>
void boost::gil::memory_based_step_iterator< Iterator >::set_step ( std::ptrdiff_t  memunit_step)
inline

Member Data Documentation

memunit_step_fn< Iterator > boost::gil::detail::step_iterator_adaptor< memory_based_step_iterator< Iterator > , Iterator, memunit_step_fn< Iterator > >::_step_fn
protectedinherited

The documentation for this class was generated from the following files: