DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CIncrementalSegmentComputer.h
1 
17 #pragma once
18 
31 #if defined(CIncrementalSegmentComputer_RECURSES)
32 #error Recursive header files inclusion detected in CIncrementalSegmentComputer.h
33 #else // defined(CIncrementalSegmentComputer_RECURSES)
34 
35 #define CIncrementalSegmentComputer_RECURSES
36 
37 #if !defined CIncrementalSegmentComputer_h
38 
39 #define CIncrementalSegmentComputer_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/geometry/curves/CSegmentFactory.h"
47 
48 namespace DGtal
49 {
50 
52  // class CIncrementalSegmentComputer
144  template <typename T>
146  {
147  // ----------------------- Concept checks ------------------------------
148  public:
149 
150  // Methods
152  {
153  typename T::ConstIterator i(myI);
154  myX.init(myI);
155 
156  ConceptUtils::sameType( myB, myX.isExtendableForward() );
157  ConceptUtils::sameType( myB, myX.extendForward() );
158  }
159  // ------------------------- Private Datas --------------------------------
160  private:
161  T myX; // only if T is default constructible.
162  typename T::ConstIterator myI;
163  bool myB;
164 
165  // ------------------------- Internals ------------------------------------
166  private:
167 
168  }; // end of concept CIncrementalSegmentComputer
169 
170 } // namespace DGtal
171 
172 // //
174 
175 #endif // !defined CIncrementalSegmentComputer_h
176 
177 #undef CIncrementalSegmentComputer_RECURSES
178 #endif // else defined(CIncrementalSegmentComputer_RECURSES)