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