DGtal  1.0.0
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  Self operator++(int a);
119 
120 
121 
127  bool operator==(const Self & other) const;
128 
134  bool operator!=(const Self & other) const;
135 
136 
144  ArithDSSIterator(const Integer a, const Integer b, const Integer mu, const Point & p);
145 
151 
152 
153 
158 
159  // ----------------------- Interface --------------------------------------
160  public:
161 
166  void selfDisplay ( std::ostream & out ) const;
167 
172  bool isValid() const;
173 
174 
175  // ------------------------- Protected Datas ------------------------------
176  private:
177  // ------------------------- Private Datas --------------------------------
178  private:
179 
184 
189 
194 
199 
200  // ------------------------- Hidden services ------------------------------
201 protected:
202 
203 
204 public:
205 
211  ArithDSSIterator ( const ArithDSSIterator & other );
212 
220  Self& operator=(const Self & other);
221 
222 
223 
224  // ------------------------- Internals ------------------------------------
225 private:
226 
227  }; // end of class ArithDSSIterator
228 
229 
236  // std::ostream&
237  //operator<< ( std::ostream & out, const ArithDSSIterator & object );
238 
239 
240 } // namespace DGtal
241 
242 
244 // Includes inline functions.
245 #if !defined(BUILD_INLINE)
246 #include "DGtal/geometry/curves/ArithDSSIterator.ih"
247 #endif
248 
249 
250 // //
252 
253 #endif // !defined ArithDSSIterator_h
254 
255 #undef ArithDSSIterator_RECURSES
256 #endif // else defined(ArithDSSIterator_RECURSES)
void selfDisplay(std::ostream &out) const
bool operator==(const Self &other) const
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
DGtal is the top-level namespace which contains all DGtal functions and types.
Self & operator=(const Self &other)
PointVector< 2, Integer > Point
Aim: An iterator on the points of a Digital Straight Segment. Template parameters are the integer typ...