DGtal  0.9.2
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  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.
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)
BOOST_CONCEPT_ASSERT((CSpace< Space >))
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Point, typename Space::Point >::value))
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89
void sameType(const T &t1, const T &t2)
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines...
Definition: CSpace.h:105
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...