DGtal
1.1.0
src
DGtal
shapes
CDigitalOrientedShape.h
1
17
#pragma once
18
31
#if defined(CDigitalOrientedShape_RECURSES)
32
#error Recursive header files inclusion detected in CDigitalOrientedShape.h
33
#else // defined(CDigitalOrientedShape_RECURSES)
34
35
#define CDigitalOrientedShape_RECURSES
36
37
#if !defined CDigitalOrientedShape_h
38
39
#define CDigitalOrientedShape_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/kernel/CCommutativeRing.h"
47
48
namespace
DGtal
49
{
50
namespace
concepts
51
{
53
// class CDigitalOrientedShape
89
template
<
typename
T>
90
struct
CDigitalOrientedShape
91
{
92
// ----------------------- Concept checks ------------------------------
93
public
:
94
// 1. define first provided types (i.e. inner types), like
95
typedef
typename
T::Point
Point
;
96
97
// 2. then check the presence of data members, operators and methods with
98
BOOST_CONCEPT_USAGE
(
CDigitalOrientedShape
)
99
{
100
ConceptUtils::sameType
(
myA
,
myX
.orientation( p ));
101
}
102
// ------------------------- Private Datas --------------------------------
103
private
:
104
T
myX
;
// only if T is default constructible.
105
Orientation
myA
;
106
Point
p
;
107
108
// ------------------------- Internals ------------------------------------
109
private
:
110
111
};
// end of concept CDigitalOrientedShape
112
}
113
}
// namespace DGtal
114
115
// //
117
118
#endif // !defined CDigitalOrientedShape_h
119
120
#undef CDigitalOrientedShape_RECURSES
121
#endif // else defined(CDigitalOrientedShape_RECURSES)
DGtal::concepts::CDigitalOrientedShape::myX
T myX
Definition:
CDigitalOrientedShape.h:104
DGtal::concepts::CDigitalOrientedShape::p
Point p
Definition:
CDigitalOrientedShape.h:106
DGtal::Orientation
Orientation
Definition:
Common.h:138
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CDigitalOrientedShape
Aim: characterizes models of digital oriented shapes. For example, models should provide an orientati...
Definition:
CDigitalOrientedShape.h:91
DGtal::concepts::CDigitalOrientedShape::Point
T::Point Point
Definition:
CDigitalOrientedShape.h:95
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CDigitalOrientedShape::myA
Orientation myA
Definition:
CDigitalOrientedShape.h:105
DGtal::concepts::CDigitalOrientedShape::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CDigitalOrientedShape)
Definition:
CDigitalOrientedShape.h:98
Point
MyPointD Point
Definition:
testClone2.cpp:383
Generated on Fri Oct 9 2020 08:57:45 for DGtal by
1.8.20