| Qore Programming Language Reference Manual 2.2.0

Loading...
Searching...
No Matches
QC_RangeIterator.dox.h
1
2 namespace Qore {
4
32 class RangeIterator : public AbstractIterator {
33
34 public:
36
50 constructor(int start, int stop, int step = 1, auto val);
51
52 public:
54
65 constructor(int stop);
66
67 public:
69
74 copy();
75
76 public:
78
95 auto getValue();
96
97 public:
99
112 bool next();
113
114 public:
116
142 reset();
143
144 public:
146
158 bool valid();
159};
160}
161
163 namespace Qore {
182
184
215 RangeIterator xrange(int start, int stop, int step = 1, auto val);
216
218
241 RangeIterator xrange(int stop);
242
244}
Qore::AbstractIterator
This class defines an abstract interface for iterators.
Definition QC_AbstractIterator.dox.h:10
Qore::RangeIterator
This class defines a range-like iterator to be used to iterate numerical sequences.
Definition QC_RangeIterator.dox.h:32
Qore::RangeIterator::copy
copy()
Creates a copy of the RangeIterator object, iterating the same object as the original and in the same...
Qore::RangeIterator::getValue
auto getValue()
returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid
Qore::RangeIterator::reset
reset()
Reset the iterator instance to its initial state (start, stop, and step).
Qore::RangeIterator::next
bool next()
This method returns True while there are more numbers to iterate and False when the range has been co...
Qore::RangeIterator::constructor
constructor(int stop)
creates the numerical sequence iterator with the initial arguments
Qore::RangeIterator::valid
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not
Qore::RangeIterator::constructor
constructor(int start, int stop, int step=1, auto val)
creates the numerical sequence iterator with the initial arguments
Qore::xrange
RangeIterator xrange(int start, int stop, int step=1, auto val)
Returns a RangeIterator containing an arithmetic progression of integers.
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3