DGtal  0.9.2
ArithDSSIterator.h
1 
18 #pragma once
19 
32 #if defined(ArithDSSIterator_RECURSES)
33 #error Recursive header files inclusion detected in ArithDSSIterator.h
34 #else // defined(ArithDSSIterator_RECURSES)
35 
36 #define ArithDSSIterator_RECURSES
37 
38 #if !defined ArithDSSIterator_h
39 
40 #define ArithDSSIterator_h
41 
43 // Inclusions
44 #include <iostream>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/kernel/PointVector.h"
47 #include "DGtal/kernel/CInteger.h"
49 
50 namespace DGtal
51 {
52 
54 // class ArithDSSIterator
62  template<typename TInteger, int connectivity = 8>
64  {
65  // ----------------------- Standard services ------------------------------
66  public:
67 
72 
76  typedef TInteger Integer;
77 
79 
84 
88  typedef std::forward_iterator_tag iterator_category;
89  typedef Point value_type;
90  typedef std::ptrdiff_t difference_type;
91  typedef const Point* pointer;
92  typedef const Point& reference;
93 
99  TInteger remainder(const Point &Q);
100 
105  reference operator*() const;
106 
111  Self& operator++();
112 
118  bool operator==(const Self & other) const;
119 
125  bool operator!=(const Self & other) const;
126 
127 
135  ArithDSSIterator(const Integer a, const Integer b, const Integer mu, const Point & p);
136 
142 
143 
144 
149 
150  // ----------------------- Interface --------------------------------------
151  public:
152 
157  void selfDisplay ( std::ostream & out ) const;
158 
163  bool isValid() const;
164 
165 
166  // ------------------------- Protected Datas ------------------------------
167  private:
168  // ------------------------- Private Datas --------------------------------
169  private:
170 
174  Integer myA;
175 
179  Integer myB;
180 
184  Integer myMu;
185 
189  Point myP;
190 
191  // ------------------------- Hidden services ------------------------------
192 protected:
193 
194 
195 public:
196 
202  ArithDSSIterator ( const ArithDSSIterator & other );
203 
211  Self& operator=(const Self & other);
212 
213 
214 
215  // ------------------------- Internals ------------------------------------
216 private:
217 
218  }; // end of class ArithDSSIterator
219 
220 
227  // std::ostream&
228  //operator<< ( std::ostream & out, const ArithDSSIterator & object );
229 
230 
231 } // namespace DGtal
232 
233 
235 // Includes inline functions.
236 #if !defined(BUILD_INLINE)
237 #include "DGtal/geometry/curves/ArithDSSIterator.ih"
238 #endif
239 
240 
241 // //
243 
244 #endif // !defined ArithDSSIterator_h
245 
246 #undef ArithDSSIterator_RECURSES
247 #endif // else defined(ArithDSSIterator_RECURSES)
TInteger remainder(const Point &Q)
std::ptrdiff_t difference_type
BOOST_CONCEPT_ASSERT((concepts::CInteger< Integer >))
reference operator*() const
bool operator!=(const Self &other) const
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
std::forward_iterator_tag iterator_category
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
Self & operator=(const Self &other)
PointVector< 2, Integer > Point
bool operator==(const Self &other) const
Aim: An iterator on the points of a Digital Straight Segment. Template parameters are the integer typ...