DGtal 0.3.0

CPointPredicate.h

Go to the documentation of this file.
00001 
00017 #pragma once
00018 
00031 #if defined(CPointPredicate_RECURSES)
00032 #error Recursive header files inclusion detected in CPointPredicate.h
00033 #else // defined(CPointPredicate_RECURSES)
00034 
00035 #define CPointPredicate_RECURSES
00036 
00037 #if !defined CPointPredicate_h
00038 
00039 #define CPointPredicate_h
00040 
00042 // Inclusions
00043 #include <iostream>
00044 #include "boost/concept_check.hpp"
00045 #include "DGtal/base/Common.h"
00047 
00048 namespace DGtal
00049 {
00050 
00052   // class CPointPredicate
00095   template <typename T>
00096   struct CPointPredicate
00097   {
00098     // ----------------------- Concept checks ------------------------------
00099   public:
00100     typedef typename T::Point Point;
00101 
00102     BOOST_CONCEPT_USAGE( CPointPredicate )
00103     {
00104       // x( p ) returns bool.
00105       ConceptUtils::sameType( myBool, myPred.operator() ( myPoint ) );
00106     }
00107     // ------------------------- Private Datas --------------------------------
00108   private:
00109     T myPred;
00110     Point myPoint;
00111     bool myBool;
00112     // ------------------------- Internals ------------------------------------
00113   private:
00114     
00115   }; // end of concept CPointPredicate
00116   
00117 } // namespace DGtal
00118 
00119 
00121 // Includes inline functions.
00122 #include "DGtal/kernel/CPointPredicate.ih"
00123 
00124 //                                                                           //
00126 
00127 #endif // !defined CPointPredicate_h
00128 
00129 #undef CPointPredicate_RECURSES
00130 #endif // else defined(CPointPredicate_RECURSES)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines