Binding source runtime interface. More...
#include <kanzi/core.ui/binding/binding_source_runtime.hpp>
Public Types | |
using | BindingProcessorRuntimeConstIterator |
Binding processor runtime constant iterator type. | |
using | BindingProcessorRuntimeContainer |
Binding processor runtime container type. | |
Public Member Functions | |
void | attachForRead () |
Attaches the binding source runtime for reading. | |
void | attachForWrite () |
Attaches the binding source runtime for writing. | |
BindingProcessorRuntimeConstIterator | beginProcessorRuntimes () const |
Gets an iterator to the beginning of binding processors. | |
void | createBindingProcessorRuntimes (const AbstractBinding &binding) |
Creates a processor runtime for each BindingProcessor held by the binding parameter. | |
void | detach () |
Detaches the binding source runtime. | |
BindingProcessorRuntimeConstIterator | endProcessorRuntimes () const |
Gets an iterator to the end of binding processors. | |
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 binding source. | |
void | setBindingRuntime (AbstractBindingRuntime &bindingRuntime) |
Sets the binding runtime. | |
bool | write (const Variant &value) |
Writes a value to binding source. | |
virtual | ~BindingSourceRuntime ()=default |
Destructor. | |
Protected Member Functions | |
virtual void | attachForReadOverride ()=0 |
Implementation-dependent attach for read. | |
virtual void | attachForWriteOverride ()=0 |
Implementation-dependent attach for write. | |
BindingSourceRuntime ()=default | |
Constructor. | |
virtual void | detachOverride ()=0 |
Implementation-dependent detach. | |
virtual bool | isConnectedOverride ()=0 |
Implementation-dependent connected check. | |
virtual bool | readOverride (Variant &value)=0 |
Implementation-dependent read. | |
virtual bool | writeOverride (const Variant &value) |
Implementation-dependent write. | |
Protected Attributes | |
AbstractBindingRuntime * | m_bindingRuntime |
Abstract binding runtime for this source. | |
BindingProcessorRuntimeContainer | m_processorRuntimes |
Binding processors (for the source, forward direction). | |
Binding source runtime interface.
Inherited by specialized binding source runtimes.
Binding processor runtime container type.
Binding processor runtime constant iterator type.
|
virtualdefault |
Destructor.
|
explicitprotecteddefault |
Constructor.
void kanzi::BindingSourceRuntime::attachForRead | ( | ) |
Attaches the binding source runtime for reading.
After attaching the binding source runtime for reading, the binding source triggers calls to AbstractBindingRuntime::notifySourceChanged(). Calling this function on binding sources is optional. Most bindings need source write notifications, and the binding runtime calls this function. You must call attachForWrite() before calling this function.
void kanzi::BindingSourceRuntime::attachForWrite | ( | ) |
Attaches the binding source runtime for writing.
After this function is called and the target is connected, you can call the write() function to write the values to the source. You must call this function before calling attachForRead().
void kanzi::BindingSourceRuntime::detach | ( | ) |
Detaches the binding source runtime.
Reads a value from binding source.
value | Output parameter for value read. |
Writes a value to binding source.
value | Value to write. |
bool kanzi::BindingSourceRuntime::isConnected | ( | ) |
Indicates whether this source is connected.
void kanzi::BindingSourceRuntime::createBindingProcessorRuntimes | ( | 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 processors.
|
inline |
Gets an iterator to the end of binding processors.
|
inline |
Gets the lookup context.
|
inline |
Sets the binding runtime.
This function is called during construction, after setting the source runtime to the binding runtime.
bindingRuntime | Binding runtime to set. |
|
inline |
Gets the binding runtime.
Implementation-dependent attach for read.
Implemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ExpressionBindingSourceRuntime, kanzi::ManualBindingSourceRuntime, kanzi::MessageBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, kanzi::TypedRenderPropertyBindingSourceRuntime< T >, kanzi::TypedVariableBindingSourceRuntime< T >, and kanzi::ValueBindingSourceRuntime.
Implementation-dependent attach for write.
Implemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ExpressionBindingSourceRuntime, kanzi::ManualBindingSourceRuntime, kanzi::MessageBindingSourceRuntime, kanzi::RenderPropertyBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, kanzi::ValueBindingSourceRuntime, and kanzi::VariableBindingSourceRuntime.
Implementation-dependent detach.
Implemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ExpressionBindingSourceRuntime, kanzi::ManualBindingSourceRuntime, kanzi::MessageBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, kanzi::TypedRenderPropertyBindingSourceRuntime< T >, kanzi::ValueBindingSourceRuntime, and kanzi::VariableBindingSourceRuntime.
Implementation-dependent read.
Implemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ExpressionBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedManualBindingSourceRuntime< T >, kanzi::TypedMessageBindingSourceRuntime< T >, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, kanzi::TypedRenderPropertyBindingSourceRuntime< T >, kanzi::TypedVariableBindingSourceRuntime< T >, and kanzi::ValueBindingSourceRuntime.
Implementation-dependent write.
Reimplemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedManualBindingSourceRuntime< T >, kanzi::TypedMessageBindingSourceRuntime< T >, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, and kanzi::ValueBindingSourceRuntime.
Implementation-dependent connected check.
Implemented in kanzi::DataSourceBindingSourceRuntime, kanzi::ExpressionBindingSourceRuntime, kanzi::ManualBindingSourceRuntime, kanzi::MessageBindingSourceRuntime, kanzi::ResourceBindingSourceRuntime, kanzi::TypedObjectPropertyBindingSourceRuntime< T >, kanzi::TypedRenderPropertyBindingSourceRuntime< T >, kanzi::TypedVariableBindingSourceRuntime< T >, and kanzi::ValueBindingSourceRuntime.
|
protected |
Binding processors (for the source, forward direction).
|
protected |
Abstract binding runtime for this source.