Iterator is an range that references a location in another range. More...
#include <kanzi/core.ui/binding/iterator_range.hpp>
Classes | |
| class | IteratorRangeLocation |
| Location implementation for iterator range. More... | |
Public Types | |
| using | const_iterator |
| Const iterator type for values. | |
| using | iterator |
| Iterator type for values. | |
Public Member Functions | |
| void | adapt (AbstractRange &range) |
| Adapt another range. | |
| PropertyObjectSharedPtr | getPropertyObject () |
| Gets a property object from the current iterator location. | |
| bool | getPropertyValue (AbstractPropertyType propertyType, Variant &value) |
| Gets a property value from the property object at current location. | |
| bool | getValue (Variant &value) |
| Gets the value at current location. | |
Public Member Functions inherited from kanzi::AbstractIndexedRange | |
| PropertyObjectSharedPtr | getPropertyObjectByIndex (size_t index) |
| Gets a property object by index. | |
| bool | getPropertyValueByIndex (size_t index, AbstractPropertyType propertyType, Variant &value) |
| Access a property in a property object at an index. | |
| size_t | getSize () |
| Gets the size of the indexed range. | |
| bool | getValueByIndex (size_t index, Variant &value) |
| Reads a value by index and writes it to a variant. | |
Public Member Functions inherited from kanzi::AbstractRange | |
| bool | adaptView (AbstractRange &potentialViewRange, size_t length) |
| Attempts to reuse a view over this range. | |
| AbstractRangeIterator | beginIteration () |
| Gets an iterator to the beginning of this range. | |
| AbstractRangeSharedPtr | clone () |
| Creates a copy of the range. | |
| void | cloneInto (AbstractRangeSharedPtr &other) |
| Clones the range into another range. | |
| AbstractRangeSharedPtr | createView (size_t length) |
| Creates a view over this range. | |
| AbstractRangeSharedPtr | evaluate () |
| Evaluate the abstract range. | |
| AbstractRangeLocationPtr | locationBegin () |
| Gets an iteratable location to beginning of the range. | |
| virtual | ~AbstractRange ()=default |
| Destructor. | |
Static Public Member Functions | |
| static IteratorRangeSharedPtr | create (AbstractRangeIterator &&sourceIterator) |
| Creates a new iterator range. | |
| static IteratorRangeSharedPtr | create (AbstractRangeSharedPtr sourceRange) |
| Creates a new iterator range. | |
| static IteratorRangeSharedPtr | create (const AbstractRangeIterator &sourceIterator) |
| Creates a new iterator range. | |
Protected Attributes | |
| AbstractRangeIterator | m_iter |
| Iterator into a source range. | |
| AbstractRangeSharedPtr | m_sourceRangeReference |
| Reference to the source range. | |
Iterator is an range that references a location in another range.
Iterator range combines a weak reference to another range and an iterator to that range. There is only one readable value, which is the current iteration location.
Evaluating the iterator range yields a new iterator range that advances the iterator one step. If the iteration has already reached the end of the source range, the evaluation returns a shared pointer to the same range (the same as default result of range evaluation).
Iterator type for values.
Const iterator type for values.
|
explicitprotected |
Constructor.
| sourceIterator | Iterator to another range. |
|
explicitprotected |
Constructor.
| sourceIterator | Iterator to another range. |
|
static |
Creates a new iterator range.
| sourceRange | Range to iterate. |
|
static |
Creates a new iterator range.
| sourceIterator | Source iterator to advance. |
|
static |
Creates a new iterator range.
| sourceIterator | Source iterator to advance. |
|
inline |
Gets a property object from the current iterator location.
|
inline |
Gets a property value from the property object at current location.
| propertyType | Property type to acquire. |
| value | Variant to store the value into. |
Gets the value at current location.
| value | Variant to store the value into. |
|
inline |
Adapt another range.
This function is used internally by Kanzi to reuse an IteratorRange as opposed to creating a new one.
| range | Range to adapt. |
|
overrideprotectedvirtual |
AbstractRange::cloneOverride() implementation.
Implements kanzi::AbstractRange.
|
overrideprotectedvirtual |
AbstractRange::cloneIntoOverride() implementation.
Implements kanzi::AbstractRange.
|
overrideprotectedvirtual |
AbstractRange::evaluateOverride() implementation.
Reimplemented from kanzi::AbstractRange.
|
overrideprotectedvirtual |
AbstractRange::locationBeginOverride() implementation.
Implements kanzi::AbstractRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getSizeOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
protected |
Iterator into a source range.
|
protected |
Reference to the source range.
AbstractRangeIterator does not hold a reference to the source range, so it falls to the IteratorRange.