DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
IteratorAdapter.h
1
16
17
#pragma once
18
30
31
#if defined(IteratorAdapter_RECURSES)
32
#error Recursive header files inclusion detected in IteratorAdapter.h
33
#else
// defined(IteratorAdapter_RECURSES)
35
#define IteratorAdapter_RECURSES
36
37
#if !defined IteratorAdapter_h
39
#define IteratorAdapter_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include <boost/iterator/transform_iterator.hpp>
47
48
namespace
DGtal
49
{
50
52
// template class IteratorAdapter
75
template
<
typename
TIterator,
typename
TFunctor,
typename
TReturnType =
typename
TFunctor::Value>
76
class
IteratorAdapter
:
77
public
boost::transform_iterator< TFunctor, TIterator, TReturnType&, TReturnType >
78
{
79
80
BOOST_CONCEPT_ASSERT
((
boost_concepts::LvalueIteratorConcept<TIterator>
));
81
82
public
:
83
85
typedef
IteratorAdapter< TIterator, TFunctor, TReturnType >
Self
;
87
typedef
boost::transform_iterator< TFunctor, TIterator, TReturnType&, TReturnType >
Parent
;
88
92
IteratorAdapter
():
Parent
() {}
99
IteratorAdapter
(
const
TIterator& iter, TFunctor func ):
Parent
(iter,func) {}
105
IteratorAdapter
(
const
Self
& other ):
Parent
( static_cast<const
Parent
&>(other) ) {}
111
IteratorAdapter
(
const
Parent
& other ):
Parent
(other) {}
118
Self
&
operator=
(
const
Self
& other )
119
{
120
if
(
this
!= &other)
121
Parent::operator=(
static_cast<
const
Parent
&
>
(other) );
122
return
*
this
;
123
}
124
130
Self
&
operator=
(
const
Parent
& other )
131
{
132
if
(
this
!= &other)
133
Parent::operator=(other);
134
return
*
this
;
135
}
136
140
~IteratorAdapter
() {}
141
};
142
143
}
// namespace DGtal
144
145
147
// Includes inline functions.
148
//#include "DGtal/base/IteratorAdapter.ih"
149
150
// //
152
153
#endif
// !defined IteratorAdapter_h
154
155
#undef IteratorAdapter_RECURSES
156
#endif
// else defined(IteratorAdapter_RECURSES)
DGtal::IteratorAdapter< TIterator, TFunctor, TReturnType >
DGtal::IteratorAdapter::~IteratorAdapter
~IteratorAdapter()
Definition
IteratorAdapter.h:140
DGtal::IteratorAdapter::Self
IteratorAdapter< TIterator, TFunctor, TReturnType > Self
Definition
IteratorAdapter.h:85
DGtal::IteratorAdapter::operator=
Self & operator=(const Parent &other)
Definition
IteratorAdapter.h:130
DGtal::IteratorAdapter< TIterator, TFunctor, TReturnType >::Parent
boost::transform_iterator< TFunctor, TIterator, TReturnType &, TReturnType > Parent
Definition
IteratorAdapter.h:87
DGtal::IteratorAdapter::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((boost_concepts::LvalueIteratorConcept< TIterator >))
DGtal::IteratorAdapter::IteratorAdapter
IteratorAdapter(const Self &other)
Definition
IteratorAdapter.h:105
DGtal::IteratorAdapter::IteratorAdapter
IteratorAdapter(const TIterator &iter, TFunctor func)
Definition
IteratorAdapter.h:99
DGtal::IteratorAdapter::IteratorAdapter
IteratorAdapter(const Parent &other)
Definition
IteratorAdapter.h:111
DGtal::IteratorAdapter::IteratorAdapter
IteratorAdapter()
Definition
IteratorAdapter.h:92
DGtal::IteratorAdapter::operator=
Self & operator=(const Self &other)
Definition
IteratorAdapter.h:118
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
boost_concepts::LvalueIteratorConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/LvalueIteratorConcept....
Definition
BoostConcepts.dox:38
src
DGtal
base
IteratorAdapter.h
Generated on
for DGtal by
1.18.0