DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DomainPredicate.ih
1 
30 
31 #include <cstdlib>
33 
35 // IMPLEMENTATION of inline methods.
37 
39 // ----------------------- Standard services ------------------------------
40 
41 //------------------------------------------------------------------------------
42 template <typename TDomain>
43 inline
45 ::DomainPredicate( const Domain & aDomain )
46  : myDomain( &aDomain )
47 {
48 }
49 //------------------------------------------------------------------------------
50 template <typename TDomain>
51 inline
54  : myDomain( other.myDomain )
55 {
56 }
57 //------------------------------------------------------------------------------
58 template <typename TDomain>
59 inline
62 ::operator=( const DomainPredicate & other )
63 {
64  if (this != &other)
65  {
66  myDomain = other.myDomain;
67  }
68  return *this;
69 }
70 
71 //------------------------------------------------------------------------------
72 template <typename TDomain>
73 inline
74 const TDomain &
76 ::domain() const
77 {
78  return *myDomain;
79 }
80 //------------------------------------------------------------------------------
81 template <typename TDomain>
82 inline
83 bool
85 ::operator()( const Point & p ) const
86 {
87  // std::cerr << "DomainPred.operator(" << p << ")" << std::endl;
88  return myDomain->isInside( p );
89 }
90 //------------------------------------------------------------------------------
91 
92 // //
94 
95