DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
kernel
CPointEmbedder.h
1
17
#pragma once
18
31
#if defined(CPointEmbedder_RECURSES)
32
#error Recursive header files inclusion detected in CPointEmbedder.h
33
#else // defined(CPointEmbedder_RECURSES)
34
35
#define CPointEmbedder_RECURSES
36
37
#if !defined CPointEmbedder_h
38
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
53
// class CPointEmbedder
93
template
<
typename
T>
94
struct
CPointEmbedder
:
CUnaryFunctor
<T, typename T::Point, typename T::RealPoint>
95
{
96
// ----------------------- Concept checks ------------------------------
97
public
:
98
typedef
typename
T::Space
Space
;
99
typedef
typename
T::Point
Point
;
100
typedef
typename
T::RealPoint
RealPoint
;
101
typedef
typename
T::Argument
Argument
;
102
typedef
typename
T::Value
Value
;
103
104
BOOST_CONCEPT_ASSERT
((
CSpace< Space >
));
105
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Point, typename Space::Point >::value
));
106
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< Point, Argument >::value
));
107
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, typename Space::RealPoint >::value
));
108
BOOST_STATIC_ASSERT
((
ConceptUtils::SameType< RealPoint, Value >::value
));
109
BOOST_CONCEPT_USAGE
(
CPointEmbedder
)
110
{
111
checkConstConstraints
();
112
}
113
114
void
checkConstConstraints
()
const
115
{
// operator()
116
ConceptUtils::sameType
(
myRP
,
myX
(
myP
) );
117
}
118
// ------------------------- Private Datas --------------------------------
119
private
:
120
T
myX
;
// do not require T to be default constructible.
121
Point
myP
;
122
RealPoint
myRP
;
123
124
// ------------------------- Internals ------------------------------------
125
private
:
126
127
};
// end of concept CPointEmbedder
128
129
}
// namespace DGtal
130
131
// //
133
134
#endif // !defined CPointEmbedder_h
135
136
#undef CPointEmbedder_RECURSES
137
#endif // else defined(CPointEmbedder_RECURSES)
Generated on Wed Dec 19 2012 19:10:21 for DGtal by
1.8.1.1