Qore Programming Language Reference Manual  0.9.11
QC_RangeIterator.dox.h
1 namespace Qore {
4 
32 
33 public:
35 
49  constructor(int start, int stop, int step = 1, auto val);
50 
51 public:
53 
64  constructor(int stop);
65 
66 public:
68 
73  copy();
74 
75 public:
77 
94 auto getValue();
95 
96 public:
98 
111 bool next();
112 
113 public:
115 
140  reset();
141 
142 public:
144 
155 bool valid();
156 };
157 }
158 
160 namespace Qore {
178 
180 
212 RangeIterator xrange(int start, int stop, int step = 1, auto val);
213 
215 
239 
241 }
Qore::RangeIterator::getValue
auto getValue()
returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid
Qore::xrange
RangeIterator xrange(int start, int stop, int step=1, auto val)
Returns a RangeIterator containing an arithmetic progression of integers.
Qore::RangeIterator
This class defines a range-like iterator to be used to iterate numerical sequences.
Definition: QC_RangeIterator.dox.h:31
Qore::RangeIterator::reset
reset()
Reset the iterator instance to its initial state (start, stop, and step).
Qore::RangeIterator::copy
copy()
Creates a copy of the RangeIterator object, iterating the same object as the original and in the same...
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 stop)
creates the numerical sequence iterator with the initial arguments
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 start, int stop, int step=1, auto val)
creates the numerical sequence iterator with the initial arguments
Qore::AbstractIterator
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3