DGtal  0.9.2
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  namespace concepts
51  {
53  // class CIncrementalSegmentComputer
111  template <typename T>
113  {
114  // ----------------------- Concept checks ------------------------------
115  public:
116 
117  // Methods
119  {
120  myX.init(myI);
121 
122  concepts::ConceptUtils::sameType( myB, myX.isExtendableFront() );
123  concepts::ConceptUtils::sameType( myB, myX.extendFront() );
124  }
125  // ------------------------- Private Datas --------------------------------
126  private:
127  T myX; // only if T is default constructible.
128  typename T::ConstIterator myI;
129  bool myB;
130 
131  // ------------------------- Internals ------------------------------------
132  private:
133 
134  }; // end of concept CIncrementalSegmentComputer
135  } //namespace concepts
136 } // namespace DGtal
137 
138 // //
140 
141 #endif // !defined CIncrementalSegmentComputer_h
142 
143 #undef CIncrementalSegmentComputer_RECURSES
144 #endif // else defined(CIncrementalSegmentComputer_RECURSES)
void sameType(const T &t1, const T &t2)
Aim: Defines the concept describing an incremental segment computer, ie. a model of CSegmentFactory t...
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...