DGtal  1.4.beta
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)
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 
111  {
113  }
114 
116  { // operator()
118  }
119  // ------------------------- Private Datas --------------------------------
120 private:
121  T myX; // do not require T to be default constructible.
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)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A point embedder is a mapping from digital points to Euclidean points. It adds inner types to fu...
BOOST_CONCEPT_ASSERT((CSpace< Space >))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, typename Space::RealPoint >::value))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< RealPoint, Value >::value))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, typename Space::Point >::value))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, Argument >::value))
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:90
MyPointD Point
Definition: testClone2.cpp:383
PointVector< 3, double > RealPoint