DGtal  1.3.beta
CPredicate.h
1 
17 #pragma once
18 
31 #if defined(CPredicate_RECURSES)
32 #error Recursive header files inclusion detected in CPredicate.h
33 #else // defined(CPredicate_RECURSES)
34 
35 #define CPredicate_RECURSES
36 
37 #if !defined CPredicate_h
38 
39 #define CPredicate_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/CUnaryFunctor.h"
47 
48 namespace DGtal
49 {
50  namespace concepts
51  {
53  // class CPredicate
92  template <typename T, typename TElement>
93  struct CPredicate : CUnaryFunctor<T,TElement,bool>
94  {
95  // ----------------------- Concept checks ------------------------------
96  public:
97  typedef TElement Element;
98 
99  // ------------------------- Private Datas --------------------------------
100  private:
103  bool myBool;
104  // ------------------------- Internals ------------------------------------
105  private:
106 
107  }; // end of concept CPredicate
108  } // namespace concepts
109 } // namespace DGtal
110 
111 // //
113 
114 #endif // !defined CPredicate_h
115 
116 #undef CPredicate_RECURSES
117 #endif // else defined(CPredicate_RECURSES)
DGtal::concepts::CPredicate::myElement
Element myElement
Definition: CPredicate.h:102
DGtal::concepts::CPredicate::Element
TElement Element
Definition: CPredicate.h:97
DGtal::concepts::CPredicate::myPred
T myPred
Definition: CPredicate.h:101
DGtal::concepts::CPredicate::myBool
bool myBool
Definition: CPredicate.h:103
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CPredicate
Aim: Defines a predicate function, ie. a functor mapping a domain into the set of booleans.
Definition: CPredicate.h:93
DGtal::concepts::CUnaryFunctor
Aim: Defines a unary functor, which associates arguments to results.
Definition: CUnaryFunctor.h:89