DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
CPointEmbedder.h
1
16
17
#pragma once
18
30
31
#if defined(CPointEmbedder_RECURSES)
32
#error Recursive header files inclusion detected in CPointEmbedder.h
33
#else
// defined(CPointEmbedder_RECURSES)
35
#define CPointEmbedder_RECURSES
36
37
#if !defined CPointEmbedder_h
39
#define CPointEmbedder_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
#include "DGtal/base/CUnaryFunctor.h"
46
#include "DGtal/kernel/CSpace.h"
48
49
namespace
DGtal
50
{
51
namespace
concepts
52
{
54
// class CPointEmbedder
94
template
<
typename
T>
95
struct
CPointEmbedder
:
CUnaryFunctor
<T, typename T::Point, typename T::RealPoint>
96
{
97
// ----------------------- Concept checks ------------------------------
98
public
:
99
typedef
typename
T::Space
Space
;
100
typedef
typename
T::Point
Point
;
101
typedef
typename
T::RealPoint
RealPoint
;
102
typedef
typename
T::Argument
Argument
;
103
typedef
typename
T::Value
Value
;
104
105
BOOST_CONCEPT_ASSERT
((
CSpace< Space >
));
106
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Point, typename Space::Point >::value
));
107
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Point, Argument >::value
));
108
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, typename Space::RealPoint >::value
));
109
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, Value >::value
));
110
BOOST_CONCEPT_USAGE
(
CPointEmbedder
)
111
{
112
checkConstConstraints
();
113
}
114
115
void
checkConstConstraints
()
const
116
{
// operator()
117
ConceptUtils::sameType
(
myRP
,
myX
(
myP
) );
118
}
119
// ------------------------- Private Data --------------------------------
120
private
:
121
T
myX
;
// do not require T to be default constructible.
122
Point
myP
;
123
RealPoint
myRP
;
124
125
// ------------------------- Internals ------------------------------------
126
private
:
127
128
};
// end of concept CPointEmbedder
129
}
130
}
// namespace DGtal
131
132
// //
134
135
#endif
// !defined CPointEmbedder_h
136
137
#undef CPointEmbedder_RECURSES
138
#endif
// else defined(CPointEmbedder_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::CPointEmbedder
Aim: A point embedder is a mapping from digital points to Euclidean points. It adds inner types to fu...
Definition
CPointEmbedder.h:96
DGtal::concepts::CPointEmbedder::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CPointEmbedder)
Definition
CPointEmbedder.h:110
DGtal::concepts::CPointEmbedder::Point
T::Point Point
Definition
CPointEmbedder.h:100
DGtal::concepts::CPointEmbedder::checkConstConstraints
void checkConstConstraints() const
Definition
CPointEmbedder.h:115
DGtal::concepts::CPointEmbedder::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CSpace< Space >))
DGtal::concepts::CPointEmbedder::Space
T::Space Space
Definition
CPointEmbedder.h:99
DGtal::concepts::CPointEmbedder::myP
Point myP
Definition
CPointEmbedder.h:122
DGtal::concepts::CPointEmbedder::RealPoint
T::RealPoint RealPoint
Definition
CPointEmbedder.h:101
DGtal::concepts::CPointEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, typename Space::RealPoint >::value))
DGtal::concepts::CPointEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, Value >::value))
DGtal::concepts::CPointEmbedder::Value
T::Value Value
Definition
CPointEmbedder.h:103
DGtal::concepts::CPointEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, typename Space::Point >::value))
DGtal::concepts::CPointEmbedder::myRP
RealPoint myRP
Definition
CPointEmbedder.h:123
DGtal::concepts::CPointEmbedder::Argument
T::Argument Argument
Definition
CPointEmbedder.h:102
DGtal::concepts::CPointEmbedder::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, Argument >::value))
DGtal::concepts::CPointEmbedder::myX
T myX
Definition
CPointEmbedder.h:121
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition
CSpace.h:106
DGtal::concepts::CUnaryFunctor
Aim: Defines a unary functor, which associates arguments to results.
Definition
CUnaryFunctor.h:90
DGtal::concepts::ConceptUtils::SameType::value
static const bool value
Definition
ConceptUtils.h:107
src
DGtal
kernel
CPointEmbedder.h
Generated on
for DGtal by
1.18.0