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