Binding target runtime interface. More...
#include <kanzi/core.ui/binding/binding_target_runtime.hpp>
Public Types | |
using | BindingProcessorRuntimeConstIterator |
Binding processor iterator type. | |
using | BindingProcessorRuntimeContainer |
Binding processor container type. | |
Public Member Functions | |
void | attachForRead () |
Attaches the binding target runtime for reading. | |
void | attachForWrite () |
Attaches the binding target runtime for writing. | |
BindingProcessorRuntimeConstIterator | beginProcessorRuntimes () const |
Gets an iterator to the beginning of binding processor runtimes. | |
void | createBindingProcessorsRuntimes (const AbstractBinding &binding) |
Creates a processor runtime for each BindingProcessor held by the binding parameter. | |
void | detach () |
Detaches binding target runtime. | |
BindingProcessorRuntimeConstIterator | endProcessorRuntimes () const |
Gets an iterator to the end of binding processor runtimes. | |
AbstractBindingRuntime * | getBindingRuntime () const |
Gets the binding runtime. | |
BindingLookupContext & | getLookupContext () const |
Gets the lookup context. | |
bool | isConnected () |
Indicates whether this source is connected. | |
bool | read (Variant &value) |
Reads a value from the binding target. | |
void | setBindingRuntime (AbstractBindingRuntime &bindingRuntime) |
Sets the binding runtime. | |
bool | write (const Variant &value) |
Writes a value to the binding target. | |
virtual | ~BindingTargetRuntime ()=default |
Destructor. | |
Protected Member Functions | |
virtual void | attachForReadOverride () |
Implementation-dependent attach. | |
virtual void | attachForWriteOverride ()=0 |
Implementation-dependent attach. | |
BindingTargetRuntime ()=default | |
Constructor. | |
virtual void | detachOverride ()=0 |
Implementation-dependent detach. | |
virtual bool | isConnectedOverride ()=0 |
Implementation-dependent connected check. | |
virtual bool | readOverride (Variant &value) |
Implementation-dependent read. | |
virtual bool | writeOverride (const Variant &value)=0 |
Implementation-dependent write. | |
Protected Attributes | |
AbstractBindingRuntime * | m_bindingRuntime |
Abstract binding runtime for this target. | |
BindingProcessorRuntimeContainer | m_processorRuntimes |
Binding processors runtimes (for the target, backward direction). | |
Binding target runtime interface.
Inherited by specialized binding target runtimes.
Binding processor container type.
Binding processor iterator type.
|
virtualdefault |
Destructor.
|
explicitprotecteddefault |
Constructor.
void kanzi::BindingTargetRuntime::attachForRead | ( | ) |
Attaches the binding target runtime for reading.
After attaching the binding target runtime for reading, the binding target triggers calls to AbstractBindingRuntime::notifyTargetChanged(). Calling this function on binding targets is optional. The binding runtime calls this function if target write notifications are necessary. This is true mostly for two-way bindings. You must call attachForWrite() before calling this function.
void kanzi::BindingTargetRuntime::attachForWrite | ( | ) |
Attaches the binding target runtime for writing.
After this function is called and the target is connected, you can call the write() function to write values to target. You must call this function before calling attachForRead().
void kanzi::BindingTargetRuntime::detach | ( | ) |
Detaches binding target runtime.
Reads a value from the binding target.
value | Output value for the read. |
Writes a value to the binding target.
Internal function called by Kanzi to write the output value to the binding target. If multiple values are written, Kanzi calls spill() instead.
value | Value to write. |
bool kanzi::BindingTargetRuntime::isConnected | ( | ) |
Indicates whether this source is connected.
void kanzi::BindingTargetRuntime::createBindingProcessorsRuntimes | ( | const AbstractBinding & | binding | ) |
Creates a processor runtime for each BindingProcessor held by the binding parameter.
binding | The binding containing a collection of processors. |
|
inline |
Gets an iterator to the beginning of binding processor runtimes.
|
inline |
Gets an iterator to the end of binding processor runtimes.
|
inline |
Gets the lookup context.
|
inline |
Gets the binding runtime.
|
inline |
Sets the binding runtime.
Called during construction, after target runtime has been set to binding runtime.
bindingRuntime | Binding runtime to set. |
Implementation-dependent attach.
Default implementation throws an error.
Reimplemented in kanzi::ManualBindingTargetRuntime, kanzi::MessageBindingTargetRuntime, kanzi::RenderValueBindingTargetRuntime, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::VariableBindingTargetRuntime.
Implementation-dependent attach.
Implemented in kanzi::DummyBindingTargetRuntime, kanzi::ManualBindingTargetRuntime, kanzi::MessageBindingTargetRuntime, kanzi::RenderValueBindingTargetRuntime, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedRenderValueBindingTargetRuntime< T >, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::VariableBindingTargetRuntime.
Implementation-dependent detach.
Implemented in kanzi::DummyBindingTargetRuntime, kanzi::ManualBindingTargetRuntime, kanzi::MessageBindingTargetRuntime, kanzi::RenderValueBindingTargetRuntime, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedRenderValueBindingTargetRuntime< T >, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::VariableBindingTargetRuntime.
Implementation-dependent read.
Default implementation throws an error.
value | Value to read. |
Reimplemented in kanzi::TypedManualBindingTargetRuntime< T >, kanzi::TypedMessageBindingTargetRuntime< T >, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::VariableBindingTargetRuntime.
|
protectedpure virtual |
Implementation-dependent write.
value | Value to write. |
Implemented in kanzi::DummyBindingTargetRuntime, kanzi::TypedManualBindingTargetRuntime< T >, kanzi::TypedMessageBindingTargetRuntime< T >, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedRenderValueBindingTargetRuntime< T >, kanzi::BlendModeRenderValueBindingTargetRuntime, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::TypedVariableBindingTargetRuntime< T >.
Implementation-dependent connected check.
Implemented in kanzi::DummyBindingTargetRuntime, kanzi::ManualBindingTargetRuntime, kanzi::MessageBindingTargetRuntime, kanzi::RenderValueBindingTargetRuntime, kanzi::TypedPropertyModifierBindingTargetRuntime< T >, kanzi::TypedValueSourceBindingTargetRuntime< T >, and kanzi::VariableBindingTargetRuntime.
|
protected |
Binding processors runtimes (for the target, backward direction).
|
protected |
Abstract binding runtime for this target.