DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CConstSinglePassRangeFromPoint.h
1
16
17
#pragma once
18
30
31
#if defined(CConstSinglePassRangeFromPoint_RECURSES)
32
#error Recursive header files inclusion detected in CConstSinglePassRangeFromPoint.h
33
#else
// defined(CConstSinglePassRangeFromPoint_RECURSES)
35
#define CConstSinglePassRangeFromPoint_RECURSES
36
37
#if !defined CConstSinglePassRangeFromPoint_h
39
#define CConstSinglePassRangeFromPoint_h
40
42
// Inclusions
43
#include "DGtal/base/Common.h"
44
#include "DGtal/base/CConstSinglePassRange.h"
46
47
namespace
DGtal
48
{
49
50
namespace
concepts
51
{
52
54
// class CConstSinglePassRangeFromPoint
84
template
<
typename
T>
85
struct
CConstSinglePassRangeFromPoint
:
CConstSinglePassRange
<T>
86
{
87
// ----------------------- Concept checks ------------------------------
88
public
:
89
// 1. define first provided types (i.e. inner types), like
90
typedef
typename
T::Point
Point
;
91
92
// 2. then check the presence of data members, operators and methods with
93
BOOST_CONCEPT_USAGE
(
CConstSinglePassRangeFromPoint
)
94
{
95
checkConstConstraints
();
96
}
97
void
checkConstConstraints
()
const
98
{
99
// const method dummyConst should take parameter myA of type A and return
100
// something of type B
101
ConceptUtils::sameType
(
myB
,
myX
.begin(
myPoint
) );
102
}
103
// ------------------------- Private Data --------------------------------
104
private
:
105
T
myX
;
// do not require T to be default constructible.
106
Point
myPoint
;
107
ConstIterartor
myB
;
108
109
// ------------------------- Internals ------------------------------------
110
private
:
111
112
};
// end of concept CConstSinglePassRangeFromPoint
113
114
}
// namespace concepts
115
116
}
// namespace DGtal
117
118
// //
120
121
#endif
// !defined CConstSinglePassRangeFromPoint_h
122
123
#undef CConstSinglePassRangeFromPoint_RECURSES
124
#endif
// else defined(CConstSinglePassRangeFromPoint_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::CConstSinglePassRangeFromPoint
Aim: refined concept of const single pass range with a begin() method from a point.
Definition
CConstSinglePassRangeFromPoint.h:86
DGtal::concepts::CConstSinglePassRangeFromPoint::myX
T myX
Definition
CConstSinglePassRangeFromPoint.h:105
DGtal::concepts::CConstSinglePassRangeFromPoint::checkConstConstraints
void checkConstConstraints() const
Definition
CConstSinglePassRangeFromPoint.h:97
DGtal::concepts::CConstSinglePassRangeFromPoint::Point
T::Point Point
Definition
CConstSinglePassRangeFromPoint.h:90
DGtal::concepts::CConstSinglePassRangeFromPoint::myPoint
Point myPoint
Definition
CConstSinglePassRangeFromPoint.h:106
DGtal::concepts::CConstSinglePassRangeFromPoint::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CConstSinglePassRangeFromPoint)
Definition
CConstSinglePassRangeFromPoint.h:93
DGtal::concepts::CConstSinglePassRangeFromPoint::myB
ConstIterartor myB
Definition
CConstSinglePassRangeFromPoint.h:107
DGtal::concepts::CConstSinglePassRange
Aim: Defines the concept describing a const single pass range.
Definition
CConstSinglePassRange.h:93
src
DGtal
base
CConstSinglePassRangeFromPoint.h
Generated on
for DGtal by
1.18.0