DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CUnaryFunctor.h
1 
17 #pragma once
18 
30 #if defined(CUnaryFunctor_RECURSES)
31 #error Recursive header files inclusion detected in CUnaryFunctor.h
32 #else // defined(CUnaryFunctor_RECURSES)
33 
34 #define CUnaryFunctor_RECURSES
35 
36 #if !defined CUnaryFunctor_h
37 
38 #define CUnaryFunctor_h
39 
41 // Inclusions
42 #include <iostream>
43 #include "DGtal/base/Common.h"
45 
46 namespace DGtal
47 {
48 
50  // class CUnaryFunctor
101  template <typename X, typename A, typename R>
102  struct CUnaryFunctor : boost::Assignable<X>
103  {
104  // ----------------------- Concept checks ------------------------------
105  public:
106 
108  {
109  // x( p ) returns myV.
110  ConceptUtils::sameType( r, x.operator() ( a ) );
111  }
112  // ------------------------- Private Datas --------------------------------
113  private:
114  X x;
115  A a;
116  R r;
117  // ------------------------- Internals ------------------------------------
118  private:
119 
120  }; // end of concept CUnaryFunctor
121 
122 } // namespace DGtal
123 
124 // //
126 
127 #endif // !defined CUnaryFunctor_h
128 
129 #undef CUnaryFunctor_RECURSES
130 #endif // else defined(CUnaryFunctor_RECURSES)