Qore Programming Language Reference Manual 1.19.2
|
This class defines an abstract interface for iterators. More...
#include <QC_AbstractIterator.dox.h>
Public Member Methods | |
abstract auto | getValue () |
returns the current value More... | |
abstract bool | next () |
Moves the current position to the next element; returns False if there are no more elements. More... | |
abstract bool | valid () |
returns True if the iterator is currently pointing at a valid element, False if not More... | |
This class defines an abstract interface for iterators.
Classes inheriting this class can be used to iterate abstract or complex objects with while Statements (using AbstractIterator::next()) or directly in the following language constructs:
|
pure virtual |
returns the current value
INVALID-ITERATOR | the iterator is not pointing at a valid element |
Implemented in Qore::AbstractLineIterator, Qore::SQL::AbstractSQLStatement, Qore::DataLineIterator, Qore::FileLineIterator, Qore::HashIterator, Qore::HashKeyIterator, Qore::HashKeyReverseIterator, Qore::HashListIterator, Qore::HashPairIterator, Qore::HashPairReverseIterator, Qore::InputStreamLineIterator, Qore::ListHashIterator, Qore::ListIterator, Qore::ObjectKeyIterator, Qore::ObjectKeyReverseIterator, Qore::ObjectPairIterator, Qore::ObjectPairReverseIterator, Qore::RangeIterator, Qore::SingleValueIterator, and Qore::SQL::SQLStatement.
|
pure virtual |
Moves the current position to the next element; returns False if there are no more elements.
This method will return True again after it returns False once if the object being iterated is not empty, otherwise it will always return False. The iterator object should not be used after this method returns False
Implemented in Qore::AbstractLineIterator, Qore::SQL::AbstractSQLStatement, Qore::DataLineIterator, Qore::FileLineIterator, Qore::HashIterator, Qore::HashListIterator, Qore::HashListReverseIterator, Qore::HashReverseIterator, Qore::InputStreamLineIterator, Qore::ListHashIterator, Qore::ListHashReverseIterator, Qore::ListIterator, Qore::ListReverseIterator, Qore::ObjectReverseIterator, Qore::RangeIterator, Qore::SingleValueIterator, and Qore::SQL::SQLStatement.
|
pure virtual |
returns True if the iterator is currently pointing at a valid element, False if not
Implemented in Qore::AbstractLineIterator, Qore::SQL::AbstractSQLStatement, Qore::DataLineIterator, Qore::FileLineIterator, Qore::HashIterator, Qore::HashListIterator, Qore::InputStreamLineIterator, Qore::ListHashIterator, Qore::ListIterator, Qore::RangeIterator, Qore::SingleValueIterator, and Qore::SQL::SQLStatement.