DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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 
52  // class CSegmentFactory
116  template <typename T>
118  {
119  // ----------------------- Concept checks ------------------------------
120  public:
121  // Inner types
122  typedef typename T::Self Self;
123  BOOST_STATIC_ASSERT(( boost::is_same< T, Self >::value ));
124  typedef typename T::Reverse Reverse;
125  // Methods
127  {
128  ConceptUtils::sameType( myT, myT.getSelf() );
129  ConceptUtils::sameType( myRT, myT.getReverse() );
130  }
131  // ------------------------- Private Datas --------------------------------
132  private:
133  T myT; // only if T is default constructible.
135 
136  // ------------------------- Internals ------------------------------------
137  private:
138 
139  }; // end of concept CSegmentFactory
140 
141 } // namespace DGtal
142 
143 // //
145 
146 #endif // !defined CSegmentFactory_h
147 
148 #undef CSegmentFactory_RECURSES
149 #endif // else defined(CSegmentFactory_RECURSES)