DGtal
1.1.0
src
DGtal
geometry
surfaces
CIncrementalPrimitiveComputer.h
1
17
#pragma once
18
31
#if defined(CIncrementalPrimitiveComputer_RECURSES)
32
#error Recursive header files inclusion detected in CIncrementalPrimitiveComputer.h
33
#else // defined(CIncrementalPrimitiveComputer_RECURSES)
34
35
#define CIncrementalPrimitiveComputer_RECURSES
36
37
#if !defined CIncrementalPrimitiveComputer_h
38
39
#define CIncrementalPrimitiveComputer_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "boost/concept_check.hpp"
46
#include "DGtal/base/ConceptUtils.h"
47
#include "DGtal/geometry/surfaces/CPrimitiveComputer.h"
49
50
// @since 0.8 In DGtal::concepts
51
namespace
DGtal
{
52
namespace
concepts {
53
55
// class CIncrementalPrimitiveComputer
98
template
<
typename
T>
99
struct
CIncrementalPrimitiveComputer
:
CPrimitiveComputer
<T>
100
{
101
// ----------------------- Concept checks ------------------------------
102
public
:
103
// Inner types
104
typedef
typename
T::Point
Point
;
105
106
// Methods
107
BOOST_CONCEPT_USAGE
(
CIncrementalPrimitiveComputer
)
108
{
109
ConceptUtils::sameType
(
myBool
,
myX
.extend(
myPoint
) );
110
checkConstConstraints
();
111
}
112
void
checkConstConstraints
()
const
113
{
114
ConceptUtils::sameType
(
myBool
,
myX
.isExtendable(
myPoint
) );
115
}
116
// ------------------------- Private Datas --------------------------------
117
private
:
118
T
myX
;
// only if T is default constructible.
119
Point
myPoint
;
120
bool
myBool
;
121
122
// ------------------------- Internals ------------------------------------
123
private
:
124
125
};
// end of concept CIncrementalPrimitiveComputer
126
127
}
// namespace concepts
128
}
// namespace DGtal
129
130
// //
132
133
#endif // !defined CIncrementalPrimitiveComputer_h
134
135
#undef CIncrementalPrimitiveComputer_RECURSES
136
#endif // else defined(CIncrementalPrimitiveComputer_RECURSES)
DGtal::concepts::CIncrementalPrimitiveComputer
Aim: Defines the concept describing an object that computes some primitive from input points given on...
Definition:
CIncrementalPrimitiveComputer.h:100
DGtal::concepts::CIncrementalPrimitiveComputer::Point
T::Point Point
Definition:
CIncrementalPrimitiveComputer.h:104
DGtal::concepts::CPrimitiveComputer
Aim: Defines the concept describing an object that computes some primitive from input points,...
Definition:
CPrimitiveComputer.h:96
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition:
ClosedIntegerHalfPlane.h:49
DGtal::concepts::CIncrementalPrimitiveComputer::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CIncrementalPrimitiveComputer)
Definition:
CIncrementalPrimitiveComputer.h:107
DGtal::concepts::CIncrementalPrimitiveComputer::checkConstConstraints
void checkConstConstraints() const
Definition:
CIncrementalPrimitiveComputer.h:112
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition:
ConceptUtils.h:117
DGtal::concepts::CIncrementalPrimitiveComputer::myPoint
Point myPoint
Definition:
CIncrementalPrimitiveComputer.h:119
DGtal::concepts::CIncrementalPrimitiveComputer::myX
T myX
Definition:
CIncrementalPrimitiveComputer.h:118
Point
MyPointD Point
Definition:
testClone2.cpp:383
DGtal::concepts::CIncrementalPrimitiveComputer::myBool
bool myBool
Definition:
CIncrementalPrimitiveComputer.h:120
Generated on Fri Oct 9 2020 08:57:47 for DGtal by
1.8.20