29#if defined(IteratorCompletion_RECURSES)
30#error Recursive header files inclusion detected in IteratorCompletion.h
33#define IteratorCompletion_RECURSES
35#if !defined IteratorCompletion_h
37#define IteratorCompletion_h
41#include <boost/iterator/reverse_iterator.hpp>
42#include <DGtal/base/SimpleRandomAccessRangeFromPoint.h>
43#include <DGtal/base/SimpleRandomAccessConstRangeFromPoint.h>
65 template <
typename TDerived >
197 TDerived*
const derived =
static_cast<TDerived*
>(
this);
213 TDerived
const*
const derived =
static_cast<TDerived const*
>(
this);
235#undef IteratorCompletion_RECURSES
Aim: Traits that must be specialized for each IteratorCompletion derived class.
Aim: Class that uses CRTP to add reverse iterators and ranges to a derived class.
IteratorCompletionTraits< TDerived >::ConstIterator ConstIterator
Constant iterator type.
~IteratorCompletion()
Protected destructor to avoid memory leak.
IteratorCompletionTraits< TDerived >::Iterator Iterator
Mutable iterator type.
SimpleRandomAccessRangeFromPoint< ConstIterator, Iterator, DistanceFunctor > Range
Mutable range type.
ConstReverseIterator crend() const
std::ptrdiff_t Difference
Type of the distance between two iterators.
ConstReverseIterator rend() const
IteratorCompletionTraits< TDerived >::DistanceFunctor DistanceFunctor
Type of the functor calculating the distance between iterators.
ConstReverseIterator rbegin() const
boost::reverse_iterator< Iterator > ReverseIterator
Mutable reverse iterator type.
ConstReverseIterator crbegin() const
boost::reverse_iterator< ConstIterator > ConstReverseIterator
Constant reverse iterator type.
SimpleRandomAccessConstRangeFromPoint< ConstIterator, DistanceFunctor > ConstRange
Constant range type.
ConstRange constRange() const
Aim: model of CConstBidirectionalRangeFromPoint that adapts any range of elements bounded by two iter...
Aim: model of CBidirectionalRangeFromPoint that adapts any range of elements bounded by two iterators...
DGtal is the top-level namespace which contains all DGtal functions and types.