DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DomainPredicate.h
1 
17 #pragma once
18 
31 #if defined(DomainPredicate_RECURSES)
32 #error Recursive header files inclusion detected in DomainPredicate.h
33 #else // defined(DomainPredicate_RECURSES)
34 
35 #define DomainPredicate_RECURSES
36 
37 #if !defined DomainPredicate_h
38 
39 #define DomainPredicate_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 DomainPredicate
67  template <typename TDomain>
69  {
70  // ----------------------- Standard services ------------------------------
71  public:
72  typedef TDomain Domain;
73  typedef typename Domain::Point Point;
74 
79  DomainPredicate ( const Domain & aDomain );
80 
85  DomainPredicate ( const DomainPredicate & other );
86 
93  DomainPredicate & operator= ( const DomainPredicate & other );
94 
99  bool operator()( const Point & p ) const;
100 
104  const Domain & domain() const;
105 
106  // ------------------------- Hidden services ------------------------------
107  protected:
108 
113  DomainPredicate();
114 
115 
116  // ------------------------- Internals ------------------------------------
117  private:
118 
120  const Domain* myDomain;
121 
122  }; // end of struct DomainPredicate
123 
124 
125 } // namespace DGtal
126 
127 
129 // Includes inline functions.
130 #include "DGtal/kernel/domains/DomainPredicate.ih"
131 
132 // //
134 
135 #endif // !defined DomainPredicate_h
136 
137 #undef DomainPredicate_RECURSES
138 #endif // else defined(DomainPredicate_RECURSES)