Kanzi 3.9.10
kanzi::AbstractIndexedRange Class Referenceabstract

Abstract indexed range interface. More...

#include <kanzi/core/property/abstract_range.hpp>

Inheritance diagram for kanzi::AbstractIndexedRange:
[legend]

Public Member Functions

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 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.
 

Protected Member Functions

bool adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override
 AbstractRange::adaptViewOverride() implementation.
 
AbstractRangeSharedPtr createViewOverride (size_t length) override
 AbstractRange::createViewOverride() implementation.
 
virtual PropertyObjectSharedPtr getPropertyObjectByIndexOverride (size_t index)=0
 Implementation-dependent access to property object.
 
virtual bool getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value)=0
 Access a property from an index.
 
virtual size_t getSizeOverride ()=0
 Implementation-dependent size query.
 
virtual bool getValueByIndexOverride (size_t index, Variant &value)=0
 Implementation-dependent access of value by index.
 
- Protected Member Functions inherited from kanzi::AbstractRange
 AbstractRange ()=default
 Constructor.
 
virtual AbstractRangeSharedPtr evaluateOverride ()
 Implementation-dependent evaluation of the range.
 
virtual AbstractRangeLocationPtr locationBeginOverride ()=0
 Implementation of iterator to beginning.
 

Detailed Description

Abstract indexed range interface.

AbstractIndexedRange is intended as use for potential optimization to avoid creating iterators when accessing ranges that can be accessed by index. Its use is intended for internal Kanzi use to avoid casting to several range types offering access without range iterator interface.

Since
Kanzi 3.9.0

Member Function Documentation

◆ getSize()

size_t kanzi::AbstractIndexedRange::getSize ( )
inline

Gets the size of the indexed range.

Returns
Number of indices available.

◆ getPropertyObjectByIndex()

PropertyObjectSharedPtr kanzi::AbstractIndexedRange::getPropertyObjectByIndex ( size_t index)
inline

Gets a property object by index.

Parameters
indexIndex of value to access.
Returns
Property object referenced by index if available, otherwise nullptr.

◆ getPropertyValueByIndex()

bool kanzi::AbstractIndexedRange::getPropertyValueByIndex ( size_t index,
AbstractPropertyType propertyType,
Variant & value )
inline

Access a property in a property object at an index.

Parameters
indexIndex of value to access.
propertyTypeproperty type to access.
valueVariant to store the value to.
Returns
If the index was valid and property object was available true, otherwise false.

◆ getValueByIndex()

bool kanzi::AbstractIndexedRange::getValueByIndex ( size_t index,
Variant & value )
inline

Reads a value by index and writes it to a variant.

Parameters
indexIndex of value to access.
valueVariant to store the value to.
Returns
If value referenced by index existed and was written true, otherwise false.

◆ adaptViewOverride()

bool kanzi::AbstractIndexedRange::adaptViewOverride ( AbstractRange & potentialViewRange,
size_t length )
overrideprotectedvirtual

AbstractRange::adaptViewOverride() implementation.

Reimplemented from kanzi::AbstractRange.

◆ createViewOverride()

AbstractRangeSharedPtr kanzi::AbstractIndexedRange::createViewOverride ( size_t length)
overrideprotectedvirtual

AbstractRange::createViewOverride() implementation.

Reimplemented from kanzi::AbstractRange.

◆ getSizeOverride()

virtual size_t kanzi::AbstractIndexedRange::getSizeOverride ( )
protectedpure virtual

◆ getPropertyObjectByIndexOverride()

virtual PropertyObjectSharedPtr kanzi::AbstractIndexedRange::getPropertyObjectByIndexOverride ( size_t index)
protectedpure virtual

Implementation-dependent access to property object.

Parameters
indexIndex of value to access.
Returns
Property object referenced by index if available, otherwise nullptr.

Implemented in kanzi::IteratorRange, kanzi::IndexedPropertyAccessRange, kanzi::ImmutableSplitStringRange, kanzi::TypedValueRange< T >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::ValueRange, kanzi::GatherLightsRenderPass::LightRange, and kanzi::IndexedViewRange.

◆ getPropertyValueByIndexOverride()

virtual bool kanzi::AbstractIndexedRange::getPropertyValueByIndexOverride ( size_t index,
AbstractPropertyType propertyType,
Variant & value )
protectedpure virtual

Access a property from an index.

Parameters
indexIndex of value to access.
propertyTypeproperty type to access.
valueVariant to store the value to.
Returns
If the index was valid and a property was available true, otherwise false.

Implemented in kanzi::IteratorRange, kanzi::IndexedPropertyAccessRange, kanzi::ImmutableSplitStringRange, kanzi::TypedValueRange< T >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::ValueRange, kanzi::GatherLightsRenderPass::LightRange, and kanzi::IndexedViewRange.

◆ getValueByIndexOverride()

virtual bool kanzi::AbstractIndexedRange::getValueByIndexOverride ( size_t index,
Variant & value )
protectedpure virtual

Implementation-dependent access of value by index.

Parameters
indexIndex of value to access.
valueVariant to store the value to.
Returns
If value referenced by index existed and was written true, otherwise false.

Implemented in kanzi::IteratorRange, kanzi::IndexedPropertyAccessRange, kanzi::ImmutableSplitStringRange, kanzi::TypedValueRange< T >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::ValueRange, and kanzi::IndexedViewRange.


The documentation for this class was generated from the following file: