Kanzi  3.9.5
Kanzi Engine API
kanzi::AbstractRange Class Referenceabstract

Abstract range interface. More...

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

Inheritance diagram for kanzi::AbstractRange:
[legend]

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

Detailed Description

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.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ ~AbstractRange()

virtual kanzi::AbstractRange::~AbstractRange ( )
virtualdefault

Destructor.

◆ AbstractRange()

kanzi::AbstractRange::AbstractRange ( )
explicitprotecteddefault

Constructor.

Member Function Documentation

◆ createView()

AbstractRangeSharedPtr kanzi::AbstractRange::createView ( size_t  length)
inline

Creates a view over this range.

Parameters
lengthLength of the view.
Returns
New range that is a view over the range.

◆ evaluate()

AbstractRangeSharedPtr kanzi::AbstractRange::evaluate ( )
inline

Evaluate the abstract range.

Returns
New range that is an evaluation of the range.

◆ beginIteration()

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

Returns
Iterator to begin.

◆ locationBegin()

AbstractRangeLocationPtr kanzi::AbstractRange::locationBegin ( )
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.

Returns
Location to begin.

◆ createViewOverride()

virtual AbstractRangeSharedPtr kanzi::AbstractRange::createViewOverride ( size_t  length)
protectedvirtual

Implementation-dependent view over the range.

Parameters
lengthLength of the view.
Returns
Evaluation of the range.

Reimplemented in kanzi::AbstractIndexedRange, and kanzi::GatherLightsRenderPass::LightRange.

◆ evaluateOverride()

virtual AbstractRangeSharedPtr kanzi::AbstractRange::evaluateOverride ( )
protectedvirtual

Implementation-dependent evaluation of the range.

Returns
Evaluation of the range.

Reimplemented in kanzi::ImmutableSplitStringRange, kanzi::ImmutableIteratorRange, kanzi::SplitStringRange, and kanzi::IteratorRange.

◆ locationBeginOverride()


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