25 #ifndef LSST_AFW_GEOM_SpanPixelIterator_h_INCLUDED
26 #define LSST_AFW_GEOM_SpanPixelIterator_h_INCLUDED
28 #include "boost/iterator/iterator_facade.hpp"
42 class SpanPixelIterator :
public boost::iterator_facade<SpanPixelIterator, lsst::geom::Point2I const,
43 boost::random_access_traversal_tag> {
54 friend class
boost::iterator_core_access;
56 lsst::geom::
Point2I const& dereference()
const {
return _p; }
58 void increment() { ++_p.getX(); }
60 void decrement() { --_p.getX(); }
62 void advance(
int n) { _p.getX() += n; }
65 return _p.getX() ==
other._p.getX() && _p.getY() ==
other._p.getY();
69 assert(
other._p.getY() == _p.getY());
70 return other._p.getX() - _p.getX();
ItemVariant const * other
An iterator that yields lsst::geom::Point2I and increases in the x direction.
SpanPixelIterator(SpanPixelIterator &&) noexcept=default
SpanPixelIterator(lsst::geom::Point2I const &p=lsst::geom::Point2I()) noexcept
SpanPixelIterator(SpanPixelIterator const &) noexcept=default
A base class for image defects.