DGtal  1.3.beta
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)
DGtal::ArithDSSIterator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< Integer >))
DGtal::ArithDSSIterator::myA
Integer myA
Definition: ArithDSSIterator.h:183
DGtal::concepts::CInteger
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
DGtal::ArithDSSIterator::operator==
bool operator==(const Self &other) const
DGtal::ArithDSSIterator::operator=
Self & operator=(const Self &other)
DGtal::ArithDSSIterator::myP
Point myP
Definition: ArithDSSIterator.h:198
DGtal::ArithDSSIterator
Aim: An iterator on the points of a Digital Straight Segment. Template parameters are the integer typ...
Definition: ArithDSSIterator.h:63
DGtal::ArithDSSIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: ArithDSSIterator.h:88
DGtal::ArithDSSIterator::difference_type
std::ptrdiff_t difference_type
Definition: ArithDSSIterator.h:90
DGtal::ArithDSSIterator::ArithDSSIterator
ArithDSSIterator()
Definition: ArithDSSIterator.h:150
DGtal::ArithDSSIterator::operator++
Self & operator++()
DGtal::ArithDSSIterator::~ArithDSSIterator
~ArithDSSIterator()
Definition: ArithDSSIterator.h:157
DGtal::ArithDSSIterator::operator!=
bool operator!=(const Self &other) const
DGtal::ArithDSSIterator::myMu
Integer myMu
Definition: ArithDSSIterator.h:193
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::ArithDSSIterator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::ArithDSSIterator::pointer
const typedef Point * pointer
Definition: ArithDSSIterator.h:91
DGtal::ArithDSSIterator::reference
const typedef Point & reference
Definition: ArithDSSIterator.h:92
DGtal::ArithDSSIterator::Integer
TInteger Integer
Definition: ArithDSSIterator.h:76
DGtal::ArithDSSIterator::Point
PointVector< 2, Integer > Point
Definition: ArithDSSIterator.h:83
DGtal::ArithDSSIterator::operator*
reference operator*() const
DGtal::ArithDSSIterator::myB
Integer myB
Definition: ArithDSSIterator.h:188
DGtal::ArithDSSIterator::remainder
TInteger remainder(const Point &Q)
DGtal::ArithDSSIterator::Self
ArithDSSIterator Self
Definition: ArithDSSIterator.h:71
DGtal::PointVector< 2, Integer >
DGtal::ArithDSSIterator::isValid
bool isValid() const
DGtal::ArithDSSIterator::value_type
Point value_type
Definition: ArithDSSIterator.h:89