ValueRange is an abstract range implementation that stores variant values. More...
#include <kanzi/core.ui/binding/value_range.hpp>
Classes | |
class | ValueRangeLocation |
Location implementation for typed value range. More... | |
Public Types | |
using | const_iterator = vector< Variant >::const_iterator |
Const iterator type for values. More... | |
using | iterator = vector< Variant >::iterator |
Iterator type for values. More... | |
Public Member Functions | |
Variant & | back () |
Returns a reference to the element at the back. More... | |
const Variant & | back () const |
Returns a reference to the element at the back. More... | |
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... | |
Variant * | data () |
Access data array. More... | |
const Variant * | data () const |
Access data array. More... | |
void | decrementSize () |
Decrement the size by one. 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... | |
Variant & | front () |
Returns a reference to the element at the front. More... | |
const Variant & | front () const |
Returns a reference to the element at the front. More... | |
void | incrementSize () |
Add an empty variant at the end of value range. More... | |
Variant & | operator[] (size_t index) |
Access by index operator. More... | |
const Variant & | operator[] (size_t index) const |
Access by index operator. More... | |
template<typename T > | |
void | push_back (const T &value) |
Appends a value to the end of internal storage. More... | |
template<typename T > | |
void | push_back (T &&value) |
Appends a value to the end of internal storage. More... | |
void | resize (size_t count) |
Resizes the range container. More... | |
template<typename T > | |
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 | |
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 ValueRangeSharedPtr | create () |
Creates a new value range. More... | |
static ValueRangeSharedPtr | create (const Variant &variant) |
Creates a new value range with one value. More... | |
Protected Attributes | |
vector< Variant > | m_values |
Array of values for this range. More... | |
ValueRange is an abstract range implementation that stores variant values.
ValueRange is intended for use within bindings, so it has an assignment interface to the range. There is no capability for PropertyObject storage, as PropertyObject cannot be a result of a mathematical binding operation and also not a valid property data type.
using kanzi::ValueRange::iterator = vector<Variant>::iterator |
Iterator type for values.
using kanzi::ValueRange::const_iterator = vector<Variant>::const_iterator |
Const iterator type for values.
|
explicitprotecteddefault |
Default constructor.
|
explicitprotected |
Constructor.
value | Value to copy. |
|
static |
Creates a new value range.
|
static |
Creates a new value range with one value.
Copies the variant value.
|
inline |
Appends a value to the end of internal storage.
value | Value to add. |
|
inline |
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 |
Returns a reference to the element at the front.
|
inline |
Returns a reference to the element at the front.
|
inline |
Returns a reference to the element at the back.
|
inline |
Returns a reference to the element at the back.
|
inline |
Access data array.
|
inline |
Access data array.
|
inline |
Tells the number of elements in the range.
|
inline |
Resizes the range container.
count | Number of elements. |
|
inline |
Add an empty variant at the end of value range.
|
inline |
Decrement the size by one.
|
inline |
Access by index operator.
index | Index to access. |
|
inline |
Access by index operator.
index | Index to access. |
|
overrideprotectedvirtual |
AbstractRange::locationBeginOverride() implementation.
Implements kanzi::AbstractRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getSizeOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getPropertyObjectByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getPropertyValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
overrideprotectedvirtual |
AbstractIndexedRange::getValueByIndexeOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
protected |
Array of values for this range.