Abstract range interface. More...
#include <kanzi/core/property/abstract_range.hpp>
Public Member Functions | |
AbstractRangeIterator | beginIteration () |
Gets an iterator to the beginning of this range. More... | |
AbstractRangeSharedPtr | createView (size_t length) |
Creates a view over this range. More... | |
AbstractRangeSharedPtr | evaluate () |
Evaluate the abstract range. More... | |
AbstractRangeLocationPtr | locationBegin () |
Gets an iteratable location to beginning of the range. More... | |
virtual | ~AbstractRange ()=default |
Destructor. More... | |
Protected Member Functions | |
AbstractRange ()=default | |
Constructor. More... | |
virtual AbstractRangeSharedPtr | createViewOverride (size_t length) |
Implementation-dependent view over the range. More... | |
virtual AbstractRangeSharedPtr | evaluateOverride () |
Implementation-dependent evaluation of the range. More... | |
virtual AbstractRangeLocationPtr | locationBeginOverride ()=0 |
Implementation of iterator to beginning. More... | |
Abstract range interface.
Provides an interface for generating iterators that extract values from a structure-like object.
The default implementation provides an iterator interface for extracting property objects. Implementations of range paradigm are free to provide alternative interfaces.
Inheriting classes should provide a way to access elements from the range by index or iteration.
|
virtualdefault |
Destructor.
|
explicitprotecteddefault |
Constructor.
|
inline |
Creates a view over this range.
length | Length of the view. |
|
inline |
Evaluate the abstract range.
AbstractRangeIterator kanzi::AbstractRange::beginIteration | ( | ) |
Gets an iterator to the beginning of this range.
Using an iterator hides the indexed or not indexed iteration detail when using ranges. Use this function to iterate ranges in an abstract fashion. Unlike STL iterators, creating an abstract iterator may have a cost, so this function is not simply named begin().
|
inline |
Gets an iteratable location to beginning of the range.
Use beginIteration() to use the iterator paradigm instead. The user should not generally need to call this function.
|
protectedvirtual |
Implementation-dependent view over the range.
length | Length of the view. |
Reimplemented in kanzi::AbstractIndexedRange, and kanzi::GatherLightsRenderPass::LightRange.
|
protectedvirtual |
Implementation-dependent evaluation of the range.
Reimplemented in kanzi::ImmutableSplitStringRange, kanzi::ImmutableIteratorRange, kanzi::SplitStringRange, and kanzi::IteratorRange.
|
protectedpure virtual |
Implementation of iterator to beginning.
Implemented in kanzi::TypedValueRange< T >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::ValueRange, kanzi::IndexedViewRange, kanzi::ImmutableSplitStringRange, kanzi::GatherLightsRenderPass::LightRange, kanzi::IndexedPropertyAccessRange, kanzi::SplitStringRange, kanzi::IteratorRange, kanzi::ViewRange, and kanzi::PropertyAccessRange.