33 #if defined(ConstRangeAdapter_RECURSES)
34 #error Recursive header files inclusion detected in ConstRangeAdapter.h
35 #else // defined(ConstRangeAdapter_RECURSES)
37 #define ConstRangeAdapter_RECURSES
39 #if !defined ConstRangeAdapter_h
41 #define ConstRangeAdapter_h
45 #include "DGtal/base/BasicFunctors.h"
47 #include "DGtal/base/ReverseIterator.h"
48 #include "DGtal/base/Circulator.h"
49 #include "DGtal/base/ConstIteratorAdapter.h"
50 #include "boost/concept_check.hpp"
85 template <
typename TIterator,
typename TFunctor,
typename TReturnType>
113 const TFunctor& aFunctor )
125 const TFunctor* aFunctorPtr )
171 out <<
"[ConstRangeAdapter]" << std::endl;
173 std::copy( this->
begin(), this->
end(), ostream_iterator<TReturnType>(out,
", ") );
182 return "ConstRangeAdapter";
291 for ( ; it != ite; ++it, ++d)
304 template <
typename TIterator,
typename TFunctor,
typename TReturnType>
306 operator<< ( std::ostream & out, const ConstRangeAdapter<TIterator, TFunctor, TReturnType> & object )
308 object.selfDisplay( out );
318 template <
typename A,
typename B>
320 operator<< ( std::ostream & out, const std::pair<A, B> & object )
322 out <<
object.first <<
"|" <<
object.second;
330 #endif // !defined ConstRangeAdapter_h
332 #undef ConstRangeAdapter_RECURSES
333 #endif // else defined(ConstRangeAdapter_RECURSES)