Kanzi  3.9.7
Kanzi Engine API
kanzi::TypedValueRange< T > Class Template Reference

TypedValueRange is a template class for holding one type of object in a range. More...

#include <kanzi/core.ui/effect/shadow_effect_renderer2d.hpp>

Inheritance diagram for kanzi::TypedValueRange< T >:
[legend]

Classes

class  TypedValueRangeLocation
 Location implementation for typed value range. More...
 

Public Types

using const_iterator = typename vector< T >::const_iterator
 Const iterator type for values. More...
 
using iterator = typename vector< T >::iterator
 Iterator type for values. More...
 

Public Member Functions

iterator begin ()
 Gets an iterator to the beginning of the range. More...
 
const_iterator begin () const
 Gets an iterator to the beginning of the range. More...
 
const_iterator cbegin () const
 Gets an iterator to the beginning of the range. More...
 
const_iterator cend () const
 Gets an iterator to the end of the range. More...
 
void clear ()
 Clears all values from internal storage. More...
 
iterator end ()
 Gets an iterator to the end of the range. More...
 
const_iterator end () const
 Gets an iterator to the end of the range. More...
 
vector< T >::reference operator[] (size_t index)
 Access operator. More...
 
vector< T >::const_reference operator[] (size_t index) const
 Const access operator. More...
 
void push_back (const T &value)
 Appends a value to the end of internal storage. More...
 
void push_back (T &&value)
 Appends a value to the end of internal storage. More...
 
void setValue (size_t index, const T &value)
 Sets a value to the internal storage index. More...
 
size_t size () const
 Tells the number of elements in the range. More...
 
- Public Member Functions inherited from kanzi::AbstractIndexedRange
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...
 

Static Public Member Functions

static shared_ptr< TypedValueRangecreate ()
 Creates a new typed value range. More...
 

Protected Member Functions

PropertyObjectSharedPtr getPropertyObjectByIndexOverride (size_t index) override
 AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation. More...
 
bool getPropertyValueByIndexOverride (size_t index, AbstractPropertyType propertyType, Variant &value) override
 AbstractIndexedRange::getPropertyValueByIndexOverride() implementation. More...
 
size_t getSizeOverride () override
 AbstractIndexedRange::getSizeOverride() implementation. More...
 
bool getValueByIndexOverride (size_t index, Variant &value) override
 AbstractIndexedRange::getValueByIndexeOverride() implementation. More...
 
AbstractRangeLocationPtr locationBeginOverride () override
 AbstractRange::locationBeginOverride() implementation. More...
 
 TypedValueRange ()=default
 Default constructor. More...
 
- Protected Member Functions inherited from kanzi::AbstractIndexedRange
bool adaptViewOverride (AbstractRange &potentialViewRange, size_t length) override
 AbstractRange::adaptViewOverride() implementation. More...
 
AbstractRangeSharedPtr createViewOverride (size_t length) override
 AbstractRange::createViewOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::AbstractRange
 AbstractRange ()=default
 Constructor. More...
 
virtual AbstractRangeSharedPtr evaluateOverride ()
 Implementation-dependent evaluation of the range. More...
 

Protected Attributes

vector< Tm_values
 Container for single type of value. More...
 

Detailed Description

template<typename T>
class kanzi::TypedValueRange< T >

TypedValueRange is a template class for holding one type of object in a range.

TypedValueRange is intended to be inherited by inherited by internal range implementations of range-producing classes.

The ability to access the TypedValueRange values directly is intended for the creator of the range to manipulate it. Regular access to the values should happen through the virtual interface.

Since
Kanzi 3.9.0

Member Typedef Documentation

template<typename T>
using kanzi::TypedValueRange< T >::iterator = typename vector<T>::iterator

Iterator type for values.

template<typename T>
using kanzi::TypedValueRange< T >::const_iterator = typename vector<T>::const_iterator

Const iterator type for values.

Constructor & Destructor Documentation

template<typename T>
kanzi::TypedValueRange< T >::TypedValueRange ( )
explicitprotecteddefault

Default constructor.

Member Function Documentation

template<typename T>
static shared_ptr<TypedValueRange> kanzi::TypedValueRange< T >::create ( )
inlinestatic

Creates a new typed value range.

Returns
New typed value range.
template<typename T>
void kanzi::TypedValueRange< T >::push_back ( const T value)
inline

Appends a value to the end of internal storage.

Parameters
valueValue to add.
template<typename T>
void kanzi::TypedValueRange< T >::push_back ( T &&  value)
inline

Appends a value to the end of internal storage.

Parameters
valueValue to add.
template<typename T>
void kanzi::TypedValueRange< T >::setValue ( size_t  index,
const T value 
)
inline

Sets a value to the internal storage index.

Parameters
indexIndex to set.
valueValue to set.
template<typename T>
void kanzi::TypedValueRange< T >::clear ( )
inline

Clears all values from internal storage.

template<typename T>
iterator kanzi::TypedValueRange< T >::begin ( )
inline

Gets an iterator to the beginning of the range.

Returns
Mutable iterator to the beginning of values.
template<typename T>
const_iterator kanzi::TypedValueRange< T >::begin ( ) const
inline

Gets an iterator to the beginning of the range.

Returns
Const iterator to the beginning of values.
template<typename T>
const_iterator kanzi::TypedValueRange< T >::cbegin ( ) const
inline

Gets an iterator to the beginning of the range.

Returns
Const iterator to the beginning of values.
template<typename T>
iterator kanzi::TypedValueRange< T >::end ( )
inline

Gets an iterator to the end of the range.

Returns
Mutable iterator to the end of values.
template<typename T>
const_iterator kanzi::TypedValueRange< T >::end ( ) const
inline

Gets an iterator to the end of the range.

Returns
Const iterator to the end of values.
template<typename T>
const_iterator kanzi::TypedValueRange< T >::cend ( ) const
inline

Gets an iterator to the end of the range.

Returns
Const iterator to the end of values.
template<typename T>
size_t kanzi::TypedValueRange< T >::size ( ) const
inline

Tells the number of elements in the range.

Returns
Element count.
template<typename T>
vector<T>::reference kanzi::TypedValueRange< T >::operator[] ( size_t  index)
inline

Access operator.

Parameters
indexIndex to access.
Returns
Reference to value at index.
template<typename T>
vector<T>::const_reference kanzi::TypedValueRange< T >::operator[] ( size_t  index) const
inline

Const access operator.

Parameters
indexIndex to access.
Returns
Const reference to value at index.
template<typename T>
AbstractRangeLocationPtr kanzi::TypedValueRange< T >::locationBeginOverride ( )
inlineoverrideprotectedvirtual
template<typename T>
size_t kanzi::TypedValueRange< T >::getSizeOverride ( )
inlineoverrideprotectedvirtual
template<typename T>
PropertyObjectSharedPtr kanzi::TypedValueRange< T >::getPropertyObjectByIndexOverride ( size_t  index)
inlineoverrideprotectedvirtual
template<typename T>
bool kanzi::TypedValueRange< T >::getPropertyValueByIndexOverride ( size_t  index,
AbstractPropertyType  propertyType,
Variant value 
)
inlineoverrideprotectedvirtual
template<typename T>
bool kanzi::TypedValueRange< T >::getValueByIndexOverride ( size_t  index,
Variant value 
)
inlineoverrideprotectedvirtual

AbstractIndexedRange::getValueByIndexeOverride() implementation.

Implements kanzi::AbstractIndexedRange.

Member Data Documentation

template<typename T>
vector<T> kanzi::TypedValueRange< T >::m_values
protected

Container for single type of value.


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