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 |
Const iterator type for values. | |
using | iterator |
Iterator type for values. | |
Public Member Functions | |
Variant & | back () |
Returns a reference to the element at the back. | |
const Variant & | back () const |
Returns a reference to the element at the back. | |
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. | |
Variant * | data () |
Access data array. | |
const Variant * | data () const |
Access data array. | |
void | decrementSize () |
Decrement the size by one. | |
iterator | end () |
Gets an iterator to the end of the range. | |
const_iterator | end () const |
Gets an iterator to the end of the range. | |
Variant & | front () |
Returns a reference to the element at the front. | |
const Variant & | front () const |
Returns a reference to the element at the front. | |
void | incrementSize () |
Add an empty variant at the end of value range. | |
Variant & | operator[] (size_t index) |
Access by index operator. | |
const Variant & | operator[] (size_t index) const |
Access by index operator. | |
template<typename T > | |
void | push_back (const T &value) |
Appends a value to the end of internal storage. | |
template<typename T > | |
void | push_back (T &&value) |
Appends a value to the end of internal storage. | |
void | resize (size_t count) |
Resizes the range container. | |
template<typename T > | |
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 ValueRangeSharedPtr | create () |
Creates a new value range. | |
static ValueRangeSharedPtr | create (const Variant &variant) |
Creates a new value range with one value. | |
Protected Attributes | |
vector< Variant > | m_values |
Array of values for this range. | |
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.
Iterator type for values.
Const iterator type for values.
|
explicitprotecteddefault |
Default constructor.
Constructor.
value | Value to copy. |
|
static |
Creates a new value range.
|
static |
Creates a new value range with one value.
Copies the variant value.
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. |
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.
Returns a reference to the element at the front.
|
inline |
Returns a reference to the element at the back.
Returns a reference to the element at the back.
|
inline |
Access data array.
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. |
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::getValueByIndexOverride() implementation.
Implements kanzi::AbstractIndexedRange.
|
protected |
Array of values for this range.