DGtal  1.5.beta
CConstSinglePassRangeFromPoint.h
1 
17 #pragma once
18 
31 #if defined(CConstSinglePassRangeFromPoint_RECURSES)
32 #error Recursive header files inclusion detected in CConstSinglePassRangeFromPoint.h
33 #else // defined(CConstSinglePassRangeFromPoint_RECURSES)
35 #define CConstSinglePassRangeFromPoint_RECURSES
36 
37 #if !defined CConstSinglePassRangeFromPoint_h
39 #define CConstSinglePassRangeFromPoint_h
40 
42 // Inclusions
43 #include "DGtal/base/Common.h"
44 #include "DGtal/base/CConstSinglePassRange.h"
46 
47 namespace DGtal
48 {
49 
50  namespace concepts
51  {
52 
54  // class CConstSinglePassRangeFromPoint
84  template <typename T>
86  {
87  // ----------------------- Concept checks ------------------------------
88  public:
89  // 1. define first provided types (i.e. inner types), like
90  typedef typename T::Point Point;
91 
92  // 2. then check the presence of data members, operators and methods with
94  {
96  }
97  void checkConstConstraints() const
98  {
99  // const method dummyConst should take parameter myA of type A and return
100  // something of type B
101  ConceptUtils::sameType( myB, myX.begin( myPoint ) );
102  }
103  // ------------------------- Private Datas --------------------------------
104  private:
105  T myX; // do not require T to be default constructible.
107  ConstIterartor myB;
108 
109  // ------------------------- Internals ------------------------------------
110  private:
111 
112  }; // end of concept CConstSinglePassRangeFromPoint
113 
114  } // namespace concepts
115 
116 } // namespace DGtal
117 
118 // //
120 
121 #endif // !defined CConstSinglePassRangeFromPoint_h
122 
123 #undef CConstSinglePassRangeFromPoint_RECURSES
124 #endif // else defined(CConstSinglePassRangeFromPoint_RECURSES)
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: refined concept of const single pass range with a begin() method from a point.
Aim: Defines the concept describing a const single pass range.
MyPointD Point
Definition: testClone2.cpp:383