TypedValueRange is a template class for holding one type of object in a range. More...
#include <kanzi/core.ui/binding/typed_value_range.hpp>
Classes | |
class | TypedValueRangeLocation |
Location implementation for typed value range. More... | |
Public Types | |
using | const_iterator |
Const iterator type for values. | |
using | iterator |
Iterator type for values. | |
Public Member Functions | |
iterator | begin () |
Gets an iterator to the beginning of the range. | |
const_iterator | begin () const |
Gets an iterator to the beginning of the range. | |
const_iterator | cbegin () const |
Gets an iterator to the beginning of the range. | |
const_iterator | cend () const |
Gets an iterator to the end of the range. | |
void | clear () |
Clears all values from internal storage. | |
iterator | end () |
Gets an iterator to the end of the range. | |
const_iterator | end () const |
Gets an iterator to the end of the range. | |
vector< T >::reference | operator[] (size_t index) |
Access operator. | |
vector< T >::const_reference | operator[] (size_t index) const |
Const access operator. | |
void | push_back (const T &value) |
Appends a value to the end of internal storage. | |
void | push_back (T &&value) |
Appends a value to the end of internal storage. | |
void | setValue (size_t index, const T &value) |
Sets a value to the internal storage index. | |
size_t | size () const |
Tells the number of elements in the range. | |
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. | |
Static Public Member Functions | |
static shared_ptr< TypedValueRange > | create () |
Creates a new typed value range. | |
Protected Attributes | |
vector< T > | m_values |
Container for single type of value. | |
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.
using kanzi::TypedValueRange< T >::iterator |
Iterator type for values.
using kanzi::TypedValueRange< T >::const_iterator |
Const iterator type for values.
|
explicitprotecteddefault |
Default constructor.
|
inlinestatic |
Creates a new typed value range.
Appends a value to the end of internal storage.
value | Value to add. |
Appends a value to the end of internal storage.
value | Value to add. |
|
inline |
Sets a value to the internal storage index.
index | Index to set. |
value | Value to set. |
|
inline |
Clears all values from internal storage.
|
inline |
Gets an iterator to the beginning of the range.
|
inline |
Gets an iterator to the beginning of the range.
|
inline |
Gets an iterator to the beginning of the range.
|
inline |
Gets an iterator to the end of the range.
|
inline |
Gets an iterator to the end of the range.
|
inline |
Gets an iterator to the end of the range.
|
inline |
Tells the number of elements in the range.
|
inline |
Access operator.
index | Index to access. |
|
inline |
Const access operator.
index | Index to access. |
|
inlineoverrideprotectedvirtual |
AbstractRange::locationBeginOverride() implementation.
Implements kanzi::AbstractRange.
|
inlineoverrideprotectedvirtual |
AbstractIndexedRange::getSizeOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
inlineoverrideprotectedvirtual |
AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
inlineoverrideprotectedvirtual |
AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
inlineoverrideprotectedvirtual |
AbstractIndexedRange::getValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
protected |
Container for single type of value.