DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CPrimitiveComputer.h
1
16
17
#pragma once
18
30
31
#if defined(CPrimitiveComputer_RECURSES)
32
#error Recursive header files inclusion detected in CPrimitiveComputer.h
33
#else
// defined(CPrimitiveComputer_RECURSES)
35
#define CPrimitiveComputer_RECURSES
36
37
#if !defined CPrimitiveComputer_h
39
#define CPrimitiveComputer_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"
48
49
// @since 0.8 In DGtal::concepts
50
namespace
DGtal
{
51
namespace
concepts
{
52
54
// class CPrimitiveComputer
94
template
<
typename
T>
95
struct
CPrimitiveComputer
:
boost::DefaultConstructible
<T>,
boost::CopyConstructible
<T>,
boost::Assignable
<T>
96
{
97
// ----------------------- Concept checks ------------------------------
98
public
:
99
// Inner types
100
typedef
typename
T::Primitive
Primitive
;
101
typedef
typename
T::Space
Space
;
102
103
// Methods
104
BOOST_CONCEPT_USAGE
(
CPrimitiveComputer
)
105
{
106
checkConstConstraints
();
107
}
108
void
checkConstConstraints
()
const
109
{
110
ConceptUtils::sameType
(
myP
,
myX
.primitive() );
111
}
112
// ------------------------- Private Data --------------------------------
113
private
:
114
T
myX
;
// only if T is default constructible.
115
Primitive
myP
;
116
117
// ------------------------- Internals ------------------------------------
118
private
:
119
120
};
// end of concept CPrimitiveComputer
121
122
}
// namespace concepts
123
}
// namespace DGtal
124
125
// //
127
128
#endif
// !defined CPrimitiveComputer_h
129
130
#undef CPrimitiveComputer_RECURSES
131
#endif
// else defined(CPrimitiveComputer_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::CPrimitiveComputer
Aim: Defines the concept describing an object that computes some primitive from input points,...
Definition
CPrimitiveComputer.h:96
DGtal::concepts::CPrimitiveComputer::Space
T::Space Space
Definition
CPrimitiveComputer.h:101
DGtal::concepts::CPrimitiveComputer::myP
Primitive myP
Definition
CPrimitiveComputer.h:115
DGtal::concepts::CPrimitiveComputer::checkConstConstraints
void checkConstConstraints() const
Definition
CPrimitiveComputer.h:108
DGtal::concepts::CPrimitiveComputer::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CPrimitiveComputer)
Definition
CPrimitiveComputer.h:104
DGtal::concepts::CPrimitiveComputer::myX
T myX
Definition
CPrimitiveComputer.h:114
DGtal::concepts::CPrimitiveComputer::Primitive
T::Primitive Primitive
Definition
CPrimitiveComputer.h:100
boost::Assignable
Go to http://www.sgi.com/tech/stl/Assignable.html.
Definition
Boost.dox:32
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition
Boost.dox:34
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition
Boost.dox:30
src
DGtal
geometry
surfaces
CPrimitiveComputer.h
Generated on
for DGtal by
1.18.0