MEMORY-BASED STEP ITERATOR. More...
#include <step_iterator.hpp>
Public Types | |
using | parent_t = detail::step_iterator_adaptor< memory_based_step_iterator< Iterator >, Iterator, memunit_step_fn< Iterator > > |
using | reference = typename parent_t::reference |
using | difference_type = typename parent_t::difference_type |
using | x_iterator = Iterator |
Public Types inherited from step_iterator_adaptor< memory_based_step_iterator< Iterator >, Iterator, memunit_step_fn< Iterator > > | |
using | parent_t = iterator_adaptor< memory_based_step_iterator< Iterator >, Iterator, use_default, use_default, use_default, typename SFn::difference_type > |
using | base_difference_type = typename std::iterator_traits< Iterator >::difference_type |
using | difference_type = typename SFn::difference_type |
using | reference = typename std::iterator_traits< Iterator >::reference |
Public Member Functions | |
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) | |
auto | operator[] (difference_type d) const -> reference |
void | set_step (std::ptrdiff_t memunit_step) |
auto | base () -> x_iterator & |
auto | base () const -> x_iterator const & |
Public Member Functions inherited from step_iterator_adaptor< memory_based_step_iterator< Iterator >, Iterator, memunit_step_fn< Iterator > > | |
step_iterator_adaptor (Iterator const &it, memunit_step_fn< Iterator > step_fn=memunit_step_fn< Iterator >()) | |
auto | step () const -> difference_type |
Additional Inherited Members | |
Protected Attributes inherited from step_iterator_adaptor< memory_based_step_iterator< Iterator >, Iterator, memunit_step_fn< Iterator > > | |
memunit_step_fn< Iterator > | _step_fn |
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
|
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