Qore Programming Language Reference Manual  0.8.12.3
QC_RangeIterator.dox.h
1 namespace Qore {
4 
30 
31 public:
33 
47  constructor(int start, int stop, int step = 1, any val);
48 
49 public:
51 
63  constructor(int stop, any val);
64 
65 public:
67 
72  copy();
73 
74 public:
76 
93 any getValue();
94 
95 public:
97 
110 bool next();
111 
112 public:
114 
139  reset();
140 
141 public:
143 
154 bool valid();
155 };
156 };
157 
159 namespace Qore {
178 
180 
209 RangeIterator xrange(int start, int stop, int step = 1, any val);
210 
212 
235 RangeIterator xrange(int stop, any val);
236 
238 };
constructor(int start, int stop, int step=1, any val)
creates the numerical sequence iterator with the initial arguments
reset()
Reset the iterator instance to its initial state (start, stop, and step).
copy()
Creates a copy of the RangeIterator object, iterating the same object as the original and in the same...
bool next()
This method returns True while there are more numbers to iterate and False when the range has been co...
This class defines a range-like iterator to be used to iterate numerical sequences.
Definition: QC_RangeIterator.dox.h:29
RangeIterator xrange(int start, int stop, int step=1, any val)
Returns a RangeIterator containing an arithmetic progression of integers.
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
any getValue()
returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid ...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10