Location into a range. More...
#include <kanzi/core/property/abstract_range.hpp>
Public Member Functions | |
bool | advance () |
Advances the location. | |
unique_ptr< AbstractRangeLocation > | clone () |
Returns a clone of this range location. | |
PropertyObjectSharedPtr | getPropertyObject () |
Access to a property object at the location. | |
bool | getPropertyValue (AbstractPropertyType propertyType, Variant &value) |
Access a property in a property object at a location. | |
AbstractRange & | getRange () |
Returns a reference to the range being iterated. | |
const AbstractRange & | getRange () const |
Returns a const reference to the range being iterated. | |
bool | getValue (Variant &value) |
Access a value from a location. | |
bool | isValid () const |
Indicates whether the location is valid. | |
bool | matches (const AbstractRangeLocation &other) const |
Indicates whether a range location matches another. | |
operator bool () const | |
Cast to bool operator. | |
bool | operator!= (const AbstractRangeLocation &rhs) const |
Not equals operator. | |
bool | operator== (const AbstractRangeLocation &rhs) const |
Equals operator. | |
virtual | ~AbstractRangeLocation ()=default |
Destructor. | |
Protected Member Functions | |
AbstractRangeLocation (AbstractRange &range) | |
Constructor. | |
virtual bool | advanceOverride ()=0 |
Implementation-dependent advance. | |
virtual unique_ptr< AbstractRangeLocation > | cloneOverride ()=0 |
Implementation-dependent clone operation. | |
virtual PropertyObjectSharedPtr | getPropertyObjectOverride ()=0 |
Implementation-dependent access to a property object. | |
virtual bool | getPropertyValueOverride (AbstractPropertyType propertyType, Variant &value)=0 |
Implementation-dependent access to a property in a property object. | |
virtual bool | getValueOverride (Variant &value)=0 |
Implementation-dependent access to a value. | |
virtual bool | isValidOverride () const =0 |
Implementation-dependent validity check. | |
virtual bool | matchesOverride (const AbstractRangeLocation &other) const =0 |
Implementation-dependent check on whether a range location matches another. | |
Protected Attributes | |
AbstractRange & | m_range |
Reference to source range. | |
Location into a range.
Abstract class used to accessing the range. Created by the range and dereferenced from AbstractRangeIterator. Virtual access to AbstractRange is implemented through AbstractRangeLocation. If the source range becomes invalid, the location is by definition invalid.
|
virtualdefault |
Destructor.
|
inlineexplicitprotected |
Constructor.
range | Source range. |
|
inline |
Returns a reference to the range being iterated.
This function should have a static polymorphism override in inheriting location classes.
|
inline |
Returns a const reference to the range being iterated.
This function should have a static polymorphism override in inheriting location classes.
|
inline |
Returns a clone of this range location.
|
inline |
Indicates whether a range location matches another.
other | Other range location. |
|
inline |
Indicates whether the location is valid.
A location is valid if it's not at the end of iteration and can be read.
|
inline |
Advances the location.
If the location was valid before advance() was called, it always increments. The return value only depends on whether the location is readable post the increment.
|
inline |
Access to a property object at the location.
If the location is not valid, the implementation must not crash. Implementation may or may not return a default value for an invalid location.
|
inline |
Access a property in a property object at a location.
If the location is not valid, the implementation must not crash. Implementation may or may not return a default value for an invalid location.
propertyType | property type to access. |
value | Variant to store the value to. |
Access a value from a location.
If the location is not valid, the implementation must not crash. Implementation may or may not return a default value for an invalid location.
value | Variant to store the value to. |
|
inline |
Cast to bool operator.
|
inline |
Equals operator.
rhs | Right-hand-side operand. |
|
inline |
Not equals operator.
rhs | Right-hand-side operand. |
|
protectedpure virtual |
Implementation-dependent clone operation.
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
|
protectedpure virtual |
Implementation-dependent check on whether a range location matches another.
other | Other range location. |
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
Implementation-dependent validity check.
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
Implementation-dependent advance.
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
|
protectedpure virtual |
Implementation-dependent access to a property object.
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
|
protectedpure virtual |
Implementation-dependent access to a property in a property object.
propertyType | property type to access. |
value | Variant to store the value to. |
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
|
protectedpure virtual |
Implementation-dependent access to a value.
value | Variant to store the value to. |
Implemented in kanzi::IteratorRange::IteratorRangeLocation, kanzi::PropertyAccessRange::PropertyAccessRangeLocation, kanzi::IndexedPropertyAccessRange::IndexedPropertyAccessRangeLocation, kanzi::SplitStringRange::SplitStringRangeLocation, kanzi::TypedValueRange< T >::TypedValueRangeLocation, kanzi::ValueRange::ValueRangeLocation, kanzi::ViewRange::ViewRangeLocation, and kanzi::IndexedViewRange::IndexedViewRangeLocation.
|
protected |
Reference to source range.
The reference is shared, since temporary ranges must remain valid if they're being iterated.