Lookup context for bindings. More...
#include <kanzi/core.ui/binding/binding_lookup_context.hpp>
Public Member Functions | |
| virtual unique_ptr< BindingLookupContext > | clone () |
| Creates a clone of this binding lookup context. | |
| virtual AbstractPropertyTypeDescriptor::ValueSourceOwner * | createValueSourceOwner (ValueSourceBindingTargetRuntime &targetRuntime, bool reuseAllowed) |
| Creates an owner for the specific type of object with which this binding lookup context is associated. | |
| virtual ObjectSharedPtr | lookup (string_view path)=0 |
| Looks up object by path. | |
| virtual void * | lookupRaw (string_view path) |
| Looks up object by path. | |
| virtual void | registerGlobalNotification (string_view path, BindingLookupNotificationBase ¬ificationObject) |
| Registers for a notification regarding global change. | |
| virtual void | registerLocalNotification (PropertyObject *object, string_view path, BindingLookupNotificationBase ¬ificationObject) |
| Registers for a notification regarding global change. | |
| virtual void | unregisterGlobalNotification (string_view path, BindingLookupNotificationBase ¬ificationObject) |
| De-registers a notification regarding global change. | |
| virtual void | unregisterLocalNotification (PropertyObject *object, string_view path, BindingLookupNotificationBase ¬ificationObject) |
| De-registers a notification regarding global change. | |
| virtual | ~BindingLookupContext ()=default |
| Destructor. | |
Protected Member Functions | |
| BindingLookupContext ()=default | |
| Constructor. | |
Lookup context for bindings.
Binding sources and targets use the lookup contexts to resolve objects based on paths. A lookup context specific to a Node or a RenderPass is created when the binding is set to that node or render pass.
|
virtualdefault |
Destructor.
|
explicitprotecteddefault |
Constructor.
|
virtual |
Creates a clone of this binding lookup context.
Reimplemented in kanzi::BindingNodeEffect2DLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, and kanzi::BindingNodeLookupContext.
|
pure virtual |
Looks up object by path.
For some implementations of BindingLookupContext, lookupRaw() might return valid pointers for non-objects, in which case lookupObject() returns nullptr.
| path | Path used for lookup. |
Implemented in kanzi::BindingNodeEffect2DLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingTriggerLookupContext.
Looks up object by path.
Default implementation internally calls lookup().
| path | Path used for lookup. |
Reimplemented in kanzi::BindingRenderValueLookupContext.
|
virtual |
Creates an owner for the specific type of object with which this binding lookup context is associated.
Default implementation of this function throws an exception.
| targetRuntime | Binding target runtime for the value source. |
| reuseAllowed | Set to true if the value source created can be reused by other functionality, such as setProperty. |
Reimplemented in kanzi::BindingNodeEffect2DLookupContext, kanzi::BindingRenderPassLookupContext, and kanzi::BindingNodeLookupContext.
|
virtual |
Registers for a notification regarding global change.
When a change happens that could make target object available, a notification is invoked on the target object. Default implementation of this function throws an exception.
| path | Path associated with lookup. |
| notificationObject | Object to register notification for. |
Reimplemented in kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingNodeEffect2DLookupContext.
|
virtual |
De-registers a notification regarding global change.
Default implementation of this function throws an exception.
| path | Path associated with lookup. |
| notificationObject | Object to register notification for. |
Reimplemented in kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingNodeEffect2DLookupContext.
|
virtual |
Registers for a notification regarding global change.
When a change happens that could make target object no longer available, a notification is invoked on the registered notification object. Object parameter may only be nullptr if path points to a local resource. Default implementation of this function throws an exception.
| object | Pointer to object. |
| path | Path associated with lookup. |
| notificationObject | Object to register notification for. |
Reimplemented in kanzi::BindingNodeEffect2DLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, and kanzi::BindingNodeLookupContext.
|
virtual |
De-registers a notification regarding global change.
Object parameter may only be nullptr if path points to a local resource. Default implementation of this function throws an exception.
| object | Pointer to object. |
| path | Path associated with lookup. |
| notificationObject | Object to register notification for. |
Reimplemented in kanzi::BindingNodeEffect2DLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingRenderValueLookupContext, and kanzi::BindingNodeLookupContext.