Kanzi 3.9.10
kanzi::IndexedViewRange Class Reference

View over another indexed range. More...

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

Inheritance diagram for kanzi::IndexedViewRange:
[legend]

Classes

class  IndexedViewRangeLocation
 Location class for indexed view range. More...
 

Public Member Functions

AbstractIndexedRangegetSourceRange ()
 Accesses the range with correct type.
 
const AbstractIndexedRangegetSourceRange () const
 Accesses the range with correct type.
 
- 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 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.
 
- Public Member Functions inherited from kanzi::ViewRangeImpl
AbstractRangegetSourceRange () const
 Gets the source range.
 
size_t getViewLength () const
 Gets the length of the view.
 
void setSourceRange (AbstractRangeSharedPtr sourceRange)
 Sets the source range.
 
void setViewLength (size_t viewLength)
 Sets the length of the view.
 

Static Public Member Functions

static bool adapt (AbstractRange &potentialViewRange, AbstractIndexedRange *sourceRange, size_t length)
 Reuse a view range.
 
static IndexedViewRangeSharedPtr create (AbstractIndexedRangeSharedPtr sourceRange, size_t length)
 Creates a new view range over a range.
 

Protected Member Functions

PropertyObjectSharedPtr getPropertyObjectByIndexOverride (size_t index) override
 AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
 
bool getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value) override
 AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
 
size_t getSizeOverride () override
 AbstractIndexedRange::getSizeOverride() implementation.
 
bool getValueByIndexOverride (size_t index, Variant &value) override
 AbstractIndexedRange::getValueByIndexOverride() implementation.
 
 IndexedViewRange (AbstractRangeSharedPtr sourceRange, size_t length)
 Creates a new view range over a range.
 
AbstractRangeLocationPtr locationBeginOverride () override
 AbstractRange::locationBeginOverride() implementation.
 
- Protected Member Functions inherited from kanzi::AbstractIndexedRange
bool adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override
 AbstractRange::adaptViewOverride() implementation.
 
AbstractRangeSharedPtr createViewOverride (size_t length) override
 AbstractRange::createViewOverride() implementation.
 
- Protected Member Functions inherited from kanzi::AbstractRange
 AbstractRange ()=default
 Constructor.
 
virtual AbstractRangeSharedPtr evaluateOverride ()
 Implementation-dependent evaluation of the range.
 
- Protected Member Functions inherited from kanzi::ViewRangeImpl
 ViewRangeImpl (AbstractRangeSharedPtr sourceRange, size_t length)
 Constructor.
 

Additional Inherited Members

- Protected Attributes inherited from kanzi::ViewRangeImpl
size_t m_length
 Limiting length.
 
AbstractRangeSharedPtr m_sourceRange
 Source range.
 

Detailed Description

View over another indexed range.

View range abstracts a view over another range, but with limited size. This version of the view range provides an indexed access interface.

Constructor & Destructor Documentation

◆ IndexedViewRange()

kanzi::IndexedViewRange::IndexedViewRange ( AbstractRangeSharedPtr sourceRange,
size_t length )
inlineexplicitprotected

Creates a new view range over a range.

Parameters
sourceRangeRange as input to the view range.
lengthView range length.

Member Function Documentation

◆ create()

static IndexedViewRangeSharedPtr kanzi::IndexedViewRange::create ( AbstractIndexedRangeSharedPtr sourceRange,
size_t length )
inlinestatic

Creates a new view range over a range.

Parameters
sourceRangeRange as input to the view range.
lengthView range length.

◆ getSourceRange() [1/2]

AbstractIndexedRange & kanzi::IndexedViewRange::getSourceRange ( )
inline

Accesses the range with correct type.

Returns
Casted range.

◆ getSourceRange() [2/2]

const AbstractIndexedRange & kanzi::IndexedViewRange::getSourceRange ( ) const
inline

Accesses the range with correct type.

Returns
Casted range.

◆ adapt()

static bool kanzi::IndexedViewRange::adapt ( AbstractRange & potentialViewRange,
AbstractIndexedRange * sourceRange,
size_t length )
static

Reuse a view range.

Parameters
potentialViewRangePotential view range.
sourceRangeSource range.
lengthView length.
Returns
If it is possible to use the existing range, true, otherwise false.
Since
Kanzi 3.9.6

◆ locationBeginOverride()

AbstractRangeLocationPtr kanzi::IndexedViewRange::locationBeginOverride ( )
overrideprotectedvirtual

◆ getSizeOverride()

size_t kanzi::IndexedViewRange::getSizeOverride ( )
overrideprotectedvirtual

◆ getPropertyObjectByIndexOverride()

PropertyObjectSharedPtr kanzi::IndexedViewRange::getPropertyObjectByIndexOverride ( size_t index)
overrideprotectedvirtual

◆ getPropertyValueByIndexOverride()

bool kanzi::IndexedViewRange::getPropertyValueByIndexOverride ( size_t index,
AbstractPropertyType propertyType,
Variant & value )
overrideprotectedvirtual

◆ getValueByIndexOverride()

bool kanzi::IndexedViewRange::getValueByIndexOverride ( size_t index,
Variant & value )
overrideprotectedvirtual

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