DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CConstBidirectionalRange.h
1
16
17
#pragma once
18
30
31
#if defined(CConstBidirectionalRange_RECURSES)
32
#error Recursive header files inclusion detected in CConstBidirectionalRange.h
33
#else
// defined(CConstBidirectionalRange_RECURSES)
35
#define CConstBidirectionalRange_RECURSES
36
37
#if !defined CConstBidirectionalRange_h
39
#define CConstBidirectionalRange_h
40
42
// Inclusions
43
#include "DGtal/base/Common.h"
44
#include "boost/concept_check.hpp"
45
#include "DGtal/base/ConceptUtils.h"
46
#include "DGtal/base/CConstSinglePassRange.h"
48
49
namespace
DGtal
50
{
51
52
namespace
concepts
53
{
54
56
// class CConstBidirectionalRange
88
template
<
typename
T>
89
struct
CConstBidirectionalRange
:
CConstSinglePassRange
<T>
90
{
91
// ----------------------- Concept checks ------------------------------
92
public
:
93
typedef
typename
T::ConstReverseIterator
ConstReverseIterator
;
94
95
BOOST_CONCEPT_ASSERT
((
boost_concepts::SinglePassIteratorConcept<ConstReverseIterator>
));
96
97
BOOST_CONCEPT_USAGE
(
CConstBidirectionalRange
)
98
{
99
checkConstConstraints
();
100
}
101
void
checkConstConstraints
()
const
102
{
103
concepts::ConceptUtils::sameType
(
it
,
i
.rbegin() );
104
concepts::ConceptUtils::sameType
(
it
,
i
.rend() );
105
}
106
107
private
:
108
T
i
;
109
ConstReverseIterator
it
;
110
};
// end of concept CConstBidirectionalRange
111
112
}
// namespace concepts
113
114
}
// namespace DGtal
115
116
117
120
121
#endif
// !defined CConstBidirectionalRange_h
122
123
#undef CConstBidirectionalRange_RECURSES
124
#endif
// else defined(CConstBidirectionalRange_RECURSES)
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition
ConceptUtils.h:117
DGtal::concepts
Aim: Gathers several functions useful for concept checks.
Definition
CPositiveIrreducibleFraction.h:54
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CConstBidirectionalRange
Aim: Defines the concept describing a bidirectional const range.
Definition
CConstBidirectionalRange.h:90
DGtal::concepts::CConstBidirectionalRange::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CConstBidirectionalRange)
Definition
CConstBidirectionalRange.h:97
DGtal::concepts::CConstBidirectionalRange::i
T i
Definition
CConstBidirectionalRange.h:108
DGtal::concepts::CConstBidirectionalRange::ConstReverseIterator
T::ConstReverseIterator ConstReverseIterator
Definition
CConstBidirectionalRange.h:93
DGtal::concepts::CConstBidirectionalRange::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIteratorConcept< ConstReverseIterator >))
DGtal::concepts::CConstBidirectionalRange::checkConstConstraints
void checkConstConstraints() const
Definition
CConstBidirectionalRange.h:101
DGtal::concepts::CConstBidirectionalRange::it
ConstReverseIterator it
Definition
CConstBidirectionalRange.h:109
DGtal::concepts::CConstSinglePassRange
Aim: Defines the concept describing a const single pass range.
Definition
CConstSinglePassRange.h:93
boost_concepts::SinglePassIteratorConcept
Go to http://www.boost.org/doc/libs/1_52_0/libs/iterator/doc/SinglePassIterator.html.
Definition
BoostConcepts.dox:44
src
DGtal
base
CConstBidirectionalRange.h
Generated on
for DGtal by
1.18.0