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. More... | |
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. More... | |
virtual ObjectSharedPtr | lookup (string_view path)=0 |
Looks up object by path. More... | |
virtual void * | lookupRaw (string_view path) |
Looks up object by path. More... | |
virtual void | registerGlobalNotification (string_view path, BindingLookupNotificationBase ¬ificationObject) |
Registers for a notification regarding global change. More... | |
virtual void | registerLocalNotification (PropertyObject *object, string_view path, BindingLookupNotificationBase ¬ificationObject) |
Registers for a notification regarding global change. More... | |
virtual void | unregisterGlobalNotification (string_view path, BindingLookupNotificationBase ¬ificationObject) |
De-registers a notification regarding global change. More... | |
virtual void | unregisterLocalNotification (PropertyObject *object, string_view path, BindingLookupNotificationBase ¬ificationObject) |
De-registers a notification regarding global change. More... | |
virtual | ~BindingLookupContext ()=default |
Destructor. More... | |
Protected Member Functions | |
BindingLookupContext ()=default | |
Constructor. More... | |
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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingNodeEffect2DLookupContext.
|
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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingNodeLookupContext, kanzi::BindingNodeEffect2DLookupContext, and kanzi::BindingTriggerLookupContext.
|
virtual |
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::BindingRenderPassLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingNodeEffect2DLookupContext.
|
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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, 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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, 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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingNodeLookupContext, and kanzi::BindingNodeEffect2DLookupContext.
|
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::BindingRenderValueLookupContext, kanzi::BindingRenderPassLookupContext, kanzi::BindingNodeEffect2DLookupContext, and kanzi::BindingNodeLookupContext.