31#if defined(ConstIteratorAdapter_RECURSES)
32#error Recursive header files inclusion detected in ConstIteratorAdapter.h
35#define ConstIteratorAdapter_RECURSES
37#if !defined ConstIteratorAdapter_h
39#define ConstIteratorAdapter_h
44#include "DGtal/base/Common.h"
45#include "DGtal/base/IteratorCirculatorTraits.h"
46#include <boost/iterator/iterator_adaptor.hpp>
47#include <boost/utility.hpp>
84 template <
typename TIterator,
typename TLightFunctor,
typename TReturnType =
typename TLightFunctor::Value >
86 :
public boost::iterator_adaptor< ConstIteratorAdapter<TIterator,TLightFunctor,TReturnType>,
87 TIterator, TReturnType, boost::use_default, TReturnType >
90 boost::iterator_adaptor< ConstIteratorAdapter<TIterator,TLightFunctor,TReturnType>,
91 TIterator, TReturnType, boost::use_default, TReturnType >
122 ,
class OtherIterator
123 ,
class OtherReturnType>
147 {
return myF(*this->base()); }
166#undef ConstIteratorAdapter_RECURSES
This class adapts any iterator so that operator* returns another element than the one pointed to by t...
ConstIteratorAdapter(ConstIteratorAdapter< OtherFunctor, OtherIterator, OtherReturnType > const &other)
boost::iterator_adaptor< ConstIteratorAdapter< TIterator, TLightFunctor, TReturnType >, TIterator, TReturnType, boost::use_default, TReturnType > Super
TLightFunctor functor() const
IteratorCirculatorTraits< TIterator >::Type Type
Super::reference dereference() const
friend class boost::iterator_core_access
ConstIteratorAdapter(TIterator const &i, TLightFunctor f)
DGtal is the top-level namespace which contains all DGtal functions and types.