Observable range. More...
#include <kanzi/core.ui/binding/observable_range.hpp>
Public Member Functions | |
| 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 void | notifyOverride () |
| Implements default notification implementation. More... | |
Protected Attributes | |
| 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... | |
Observable range.
Provides an interface for listening and notification on the range.
Inheriting classes should provide a way to access elements from the range by index or iteration.
|
inline |
Constructor.
| name | Range name. |
|
virtualdefault |
Destructor.
|
inline |
Gets the name of the iterator.
|
inline |
Checks whether the name of the iterator matches a given name.
| name | Name to compare against. |
|
inline |
Invalidates the range.
This removes the reference to the factory that created the iterator.
|
inline |
Checks whether the iterator is valid.
|
inline |
Sets the factory reference for the observable range.
Used to check if the range is valid.
| factory | Factory that produced the range. |
|
inline |
Notifies the iterator about the iteration contents having changed.
| void kanzi::ObservableRange::addNotification | ( | void * | data, |
| NotificationFunction | func | ||
| ) |
Sets the notification function.
| data | Notification function data. |
| func | Function to invoke when the iterator is notified. |
| bool kanzi::ObservableRange::hasNotification | ( | void * | data, |
| NotificationFunction | func | ||
| ) | const |
Tells if given notification exists.
| data | Notification function data. |
| func | Function to invoke when the iterator is notified. |
| void kanzi::ObservableRange::removeNotification | ( | void * | data, |
| NotificationFunction | func | ||
| ) |
Removes a notification function.
| data | Notification function data. |
| func | Function to invoke when the iterator is notified. |
|
protectedvirtual |
Implements default notification implementation.
Can be overridden by successive classes.
Reimplemented in kanzi::GatherNearestLightsRenderPass::NearestLightRange.
|
protected |
Identifying iterator name.
|
protected |
Functions to call when notified.
|
protected |
Iterator factory that created this iterator.