33 #if defined(ConstRangeAdapter_RECURSES)
34 #error Recursive header files inclusion detected in ConstRangeAdapter.h
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(), std::ostream_iterator<TReturnType>(out,
", ") );
182 return "ConstRangeAdapter";
246 ConstReverseIterator
rend()
const {
257 ConstCirculator
c()
const {
269 ConstReverseCirculator
rc()
const {
301 for ( ; it != ite; ++it, ++d)
314 template <
typename TIterator,
typename TFunctor,
typename TReturnType>
318 object.selfDisplay( out );
328 template <
typename A,
typename B>
330 operator<< ( std::ostream & out,
const std::pair<A, B> &
object )
332 out <<
object.first <<
"|" <<
object.second;
342 #undef ConstRangeAdapter_RECURSES
Aim: Provides an adapter for classical iterators that can iterate through the underlying data structu...
This class adapts any iterator so that operator* returns another element than the one pointed to by t...
Aim: model of CConstBidirectionalRange that adapts any range of elements bounded by two iterators [it...
ReverseIterator< ConstCirculator > ConstReverseCirculator
Difference size(const TIterator &itb, const TIterator &ite, RandomAccessCategory) const
ConstRangeAdapter(const ConstRangeAdapter &other)
ConstReverseIterator rbegin() const
ConstRangeAdapter(const TIterator &itb, const TIterator &ite, const TFunctor *aFunctorPtr)
BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIteratorConcept< TIterator >))
Circulator< ConstIterator > ConstCirculator
ConstCirculator c() const
ReverseIterator< ConstIterator > ConstReverseIterator
ConstRangeAdapter & operator=(const ConstRangeAdapter &other)
Difference size(const TIterator &itb, const TIterator &ite, BidirectionalCategory) const
IteratorCirculatorTraits< ConstIterator >::Difference Difference
void selfDisplay(std::ostream &out) const
ConstIterator begin() const
ConstIteratorAdapter< TIterator, TFunctor, TReturnType > ConstIterator
ConstRangeAdapter(const TIterator &itb, const TIterator &ite, const TFunctor &aFunctor)
ConstReverseCirculator rc() const
ConstReverseIterator rend() const
ConstIterator end() const
const TFunctor * myFunctor
std::string className() const
BOOST_CONCEPT_ASSERT((boost_concepts::BidirectionalTraversalConcept< TIterator >))
This class adapts any bidirectional iterator so that operator++ calls operator-- and vice versa.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
IC::difference_type Difference
ToDGtalCategory< typename boost::iterator_category< IC >::type >::Category Category
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/BidirectionalTraversal....
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/ReadableIterator.html.