Value Range is an observable range implementation that provides a way to access values by index. More...
#include <kanzi/core.ui/binding/value_range.hpp>
Public Member Functions | |
| bool | getValue (Variant &value, size_t index) |
| Gets a value from the range by index. More... | |
| ValueRange (string_view name) | |
| Constructor. More... | |
Public Member Functions inherited from kanzi::ObservableRange | |
| void | addNotification (void *data, NotificationFunction func) |
| Sets the notification function. More... | |
| string | getName () const |
| Gets the name of the iterator. More... | |
| bool | hasNotification (void *data, NotificationFunction func) const |
| Tells if given notification exists. More... | |
| void | invalidate () |
| Invalidates the range. More... | |
| bool | isNamed (string_view name) const |
| Checks whether the name of the iterator matches a given name. More... | |
| bool | isValid () |
| Checks whether the iterator is valid. More... | |
| void | notify () |
| Notifies the iterator about the iteration contents having changed. More... | |
| ObservableRange (string_view name) | |
| Constructor. More... | |
| void | removeNotification (void *data, NotificationFunction func) |
| Removes a notification function. More... | |
| void | setRangeProducerReference (ObservableRangeProducerSharedPtr factory) |
| Sets the factory reference for the observable range. More... | |
| virtual | ~ObservableRange ()=default |
| Destructor. More... | |
Protected Member Functions | |
| virtual bool | getValueOverride (Variant &value, size_t index)=0 |
| Internal implementation of value acquisition. More... | |
Protected Member Functions inherited from kanzi::ObservableRange | |
| virtual void | notifyOverride () |
| Implements default notification implementation. More... | |
Additional Inherited Members | |
Protected Attributes inherited from kanzi::ObservableRange | |
| ObservableRangeProducerWeakPtr | m_factory |
| Iterator factory that created this iterator. More... | |
| string | m_name |
| Identifying iterator name. More... | |
| vector< NotificationInfo > | m_notifications |
| Functions to call when notified. More... | |
Value Range is an observable range implementation that provides a way to access values by index.
Use Value Range in iterators in bindings that need to retrieve values.
The range construction is responsible for determining the value to extract, the range interface only accesses by index.
|
inline |
Constructor.
| name | Name to create the iterator with. |
|
inline |
Gets a value from the range by index.
| value | Variant to write the acquired value to. |
| index | Index of the value to access. |
|
protectedpure virtual |
Internal implementation of value acquisition.
| value | Variant to write the acquired value to. |
| index | Index of the value to access. |
Implemented in kanzi::GatherLightsRenderPass::LightRange, and kanzi::GatherNearestLightsRenderPass::NearestLightRange.