Abstract range iterator interface. More...
#include <kanzi/core/property/abstract_range.hpp>
Public Member Functions | |
AbstractRangeIterator ()=default | |
Default constructor. More... | |
AbstractRangeIterator (AbstractRangeLocationPtr location) | |
Constructor. More... | |
AbstractRangeIterator (AbstractIndexedRange &range) | |
Constructor. More... | |
AbstractRangeIterator (AbstractRange &range) | |
Constructor. More... | |
AbstractRangeIterator (const AbstractRangeIterator &other) | |
Copy constructor. More... | |
AbstractRangeIterator (AbstractRangeIterator &&other) | |
Move constructor. More... | |
bool | advance () |
Advances the iterator. More... | |
PropertyObjectSharedPtr | getPropertyObject () |
Access to a property object at the iterator location. More... | |
bool | getPropertyValue (AbstractPropertyType propertyType, Variant &value) |
Access a property at the iterator location. More... | |
AbstractRange * | getRange () const |
Accesses the shared range being iterated. More... | |
bool | getValue (Variant &value) |
Access a value from a location. More... | |
bool | isValid () const |
Indicates whether the iterator is valid. More... | |
operator bool () const | |
Operator for checking if the iterator has been initialized. More... | |
bool | operator!= (const AbstractRangeIterator &rhs) const |
Not equals operator. More... | |
AbstractRangeIterator & | operator= (const AbstractRangeIterator &other) |
Copy operator. More... | |
AbstractRangeIterator & | operator= (AbstractRangeIterator &&other) |
Move operator. More... | |
bool | operator== (const AbstractRangeIterator &rhs) const |
Equals operator. More... | |
Protected Attributes | |
size_t | m_index |
Index of the iteration. More... | |
AbstractIndexedRange * | m_indexedRange |
Reference to indexed range. More... | |
AbstractRangeLocationPtr | m_location |
Location in this iterator. More... | |
size_t | m_size |
Size of the indexed range. More... | |
Abstract range iterator interface.
Range iterators are value types, so the virtual access to the range is implemented through range location. If the range becomes invalid, the iterator is also no longer valid.
|
explicitdefault |
Default constructor.
Constructs an invalid iterator. Functions should not be called.
|
inlineexplicit |
Constructor.
location | Range location. |
|
inlineexplicit |
Constructor.
range | Reference to an indexed range. |
|
inlineexplicit |
Constructor.
range | Range to iterate. |
|
inline |
Copy constructor.
other | Source iterator. |
|
inline |
Move constructor.
other | Source iterator location. |
|
inline |
Accesses the shared range being iterated.
Only returns a meaningful pointer if the iterator is valid.
|
inline |
Indicates whether the iterator is valid.
If the location has not been set, an iterator is not valid. A iterator is valid if it's not at the end of iteration and can be read.
|
inline |
Advances the iterator.
If the iterator was valid before advance() was called, it always increments. The return value only depends on whether the iterator is readable post the increment.
|
inline |
Access to a property object at the iterator location.
If the iterator is not valid, results are undefined.
|
inline |
Access a property at the iterator location.
If the iterator is not valid, results are undefined.
propertyType | property type to access. |
value | Variant to store the value to. |
|
inline |
Access a value from a location.
If the iterator is not valid, results are undefined.
value | Variant to store the value to. |
|
inline |
Operator for checking if the iterator has been initialized.
move() from an AbstractRangeIterator makes it uninitialized.
|
inline |
Equals operator.
rhs | Right-hand-side operand. |
|
inline |
Not equals operator.
rhs | Right-hand-side operand. |
|
inline |
Copy operator.
other | Source object. |
|
inline |
Move operator.
other | Source object. |
|
protected |
Location in this iterator.
|
protected |
Reference to indexed range.
|
protected |
Size of the indexed range.
|
protected |
Index of the iteration.