DGtal  0.9.2
CSegmentFactory.h
1 
17 #pragma once
18 
31 #if defined(CSegmentFactory_RECURSES)
32 #error Recursive header files inclusion detected in CSegmentFactory.h
33 #else // defined(CSegmentFactory_RECURSES)
34 
35 #define CSegmentFactory_RECURSES
36 
37 #if !defined CSegmentFactory_h
38 
39 #define CSegmentFactory_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/geometry/curves/CSegment.h"
47 
48 namespace DGtal
49 {
50  namespace concepts
51  {
53  // class CSegmentFactory
91  template <typename T>
93  {
94  // ----------------------- Concept checks ------------------------------
95  public:
96  // Inner types
97  typedef typename T::Self Self;
98  BOOST_STATIC_ASSERT(( boost::is_same< T, Self >::value ));
99  typedef typename T::Reverse Reverse;
100  // Methods
102  {
104  concepts::ConceptUtils::sameType( myRT, myT.getReverse() );
105  }
106  // ------------------------- Private Datas --------------------------------
107  private:
108  T myT; // only if T is default constructible.
109  Reverse myRT;
110 
111  // ------------------------- Internals ------------------------------------
112  private:
113 
114  }; // end of concept CSegmentFactory
115  }
116 } // namespace DGtal
117 
118 // //
120 
121 #endif // !defined CSegmentFactory_h
122 
123 #undef CSegmentFactory_RECURSES
124 #endif // else defined(CSegmentFactory_RECURSES)
void sameType(const T &t1, const T &t2)
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: Defines the concept describing a segment ie. a valid and not empty subrange, which can construct...
BOOST_STATIC_ASSERT((boost::is_same< T, Self >::value))
Aim: Defines the concept describing a segment, ie. a valid and not empty range.
Definition: CSegment.h:101