Kanzi  3.9.6
Kanzi Engine API
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. More...
 
bool getPropertyValueByIndex (size_t index, AbstractPropertyType propertyType, Variant &value)
 Access a property in a property object at an index. More...
 
size_t getSize ()
 Gets the size of the indexed range. More...
 
bool getValueByIndex (size_t index, Variant &value)
 Reads a value by index and writes it to a variant. More...
 
- Public Member Functions inherited from kanzi::AbstractRange
bool adaptView (AbstractRange &potentialViewRange, size_t length)
 Attempts to reuse a view over this range. More...
 
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

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

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::TypedValueRange< T >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::IndexedViewRange, kanzi::ValueRange, kanzi::ImmutableSplitStringRange, kanzi::IndexedPropertyAccessRange, kanzi::GatherLightsRenderPass::LightRange, and kanzi::IteratorRange.

◆ 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::TypedValueRange< T >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::IndexedViewRange, kanzi::ValueRange, kanzi::ImmutableSplitStringRange, kanzi::IndexedPropertyAccessRange, kanzi::GatherLightsRenderPass::LightRange, and kanzi::IteratorRange.

◆ 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::TypedValueRange< T >, kanzi::TypedValueRange< NodeWeakPtr >, kanzi::TypedValueRange< LightInfo >, kanzi::TypedValueRange< LightDistanceInfo >, kanzi::IndexedViewRange, kanzi::ValueRange, kanzi::ImmutableSplitStringRange, kanzi::IndexedPropertyAccessRange, and kanzi::IteratorRange.


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