DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SetPredicate.h
1 
17 #pragma once
18 
31 #if defined(SetPredicate_RECURSES)
32 #error Recursive header files inclusion detected in SetPredicate.h
33 #else // defined(SetPredicate_RECURSES)
34 
35 #define SetPredicate_RECURSES
36 
37 #if !defined SetPredicate_h
38 
39 #define SetPredicate_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/BasicPointPredicates.h"
47 
48 namespace DGtal
49 {
50 
52  // template class SetPredicate
60  template <typename TDigitalSet>
61  struct SetPredicate
62  {
63  // ----------------------- Standard services ------------------------------
64  public:
65  typedef TDigitalSet DigitalSet;
66  typedef typename DigitalSet::Domain Domain;
67  typedef typename Domain::Point Point;
68 
73  SetPredicate ( const DigitalSet & aSet );
74 
79  SetPredicate ( const SetPredicate & other );
80 
86  SetPredicate & operator= ( const SetPredicate & other );
87 
92  bool operator()( const Point & p ) const;
93 
94  // ------------------------- Hidden services ------------------------------
95  protected:
96 
101  SetPredicate();
102 
103  // ------------------------- Internals ------------------------------------
104  private:
109 
110  }; // end of struct SetPredicate
111 
112 
113 } // namespace DGtal
114 
115 
117 // Includes inline functions.
118 #include "DGtal/kernel/sets/SetPredicate.ih"
119 
120 // //
122 
123 #endif // !defined SetPredicate_h
124 
125 #undef SetPredicate_RECURSES
126 #endif // else defined(SetPredicate_RECURSES)