Kanzi 3.9.10
kanzi::BindingSourceRuntime Class Referenceabstract

Binding source runtime interface. More...

#include <kanzi/core.ui/binding/binding_source_runtime.hpp>

Inheritance diagram for kanzi::BindingSourceRuntime:
[legend]

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.
 
AbstractBindingRuntimegetBindingRuntime () const
 Gets the binding runtime.
 
BindingLookupContextgetLookupContext () 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

AbstractBindingRuntimem_bindingRuntime
 Abstract binding runtime for this source.
 
BindingProcessorRuntimeContainer m_processorRuntimes
 Binding processors (for the source, forward direction).
 

Detailed Description

Binding source runtime interface.

Inherited by specialized binding source runtimes.

See also
BindingSource
Since
Kanzi 3.7.0

Member Typedef Documentation

◆ BindingProcessorRuntimeContainer

◆ BindingProcessorRuntimeConstIterator

Constructor & Destructor Documentation

◆ ~BindingSourceRuntime()

virtual kanzi::BindingSourceRuntime::~BindingSourceRuntime ( )
virtualdefault

Destructor.

◆ BindingSourceRuntime()

kanzi::BindingSourceRuntime::BindingSourceRuntime ( )
explicitprotecteddefault

Constructor.

Since
Kanzi 3.9.6 Removed BindingLookupContextPtr.

Member Function Documentation

◆ attachForRead()

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.

◆ attachForWrite()

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().

◆ detach()

void kanzi::BindingSourceRuntime::detach ( )

Detaches the binding source runtime.

◆ read()

bool kanzi::BindingSourceRuntime::read ( Variant & value)

Reads a value from binding source.

Parameters
valueOutput parameter for value read.
Returns
Write success status.

◆ write()

bool kanzi::BindingSourceRuntime::write ( const Variant & value)

Writes a value to binding source.

Parameters
valueValue to write.
Returns
Write success status.

◆ isConnected()

bool kanzi::BindingSourceRuntime::isConnected ( )

Indicates whether this source is connected.

Returns
If the source is connected, true, otherwise false.

◆ createBindingProcessorRuntimes()

void kanzi::BindingSourceRuntime::createBindingProcessorRuntimes ( const AbstractBinding & binding)

Creates a processor runtime for each BindingProcessor held by the binding parameter.

Parameters
bindingThe binding containing a collection of processors.

◆ beginProcessorRuntimes()

BindingProcessorRuntimeConstIterator kanzi::BindingSourceRuntime::beginProcessorRuntimes ( ) const
inline

Gets an iterator to the beginning of binding processors.

Returns
Iterator to beginning of processor array.

◆ endProcessorRuntimes()

BindingProcessorRuntimeConstIterator kanzi::BindingSourceRuntime::endProcessorRuntimes ( ) const
inline

Gets an iterator to the end of binding processors.

Returns
Iterator to end of processor array.

◆ getLookupContext()

BindingLookupContext & kanzi::BindingSourceRuntime::getLookupContext ( ) const
inline

Gets the lookup context.

Returns
The binding lookup context.

◆ setBindingRuntime()

void kanzi::BindingSourceRuntime::setBindingRuntime ( AbstractBindingRuntime & bindingRuntime)
inline

Sets the binding runtime.

This function is called during construction, after setting the source runtime to the binding runtime.

Parameters
bindingRuntimeBinding runtime to set.

◆ getBindingRuntime()

AbstractBindingRuntime * kanzi::BindingSourceRuntime::getBindingRuntime ( ) const
inline

Gets the binding runtime.

Returns
Pointer to owning binding runtime.

◆ attachForReadOverride()

◆ attachForWriteOverride()

◆ detachOverride()

◆ readOverride()

◆ writeOverride()

◆ isConnectedOverride()

Member Data Documentation

◆ m_processorRuntimes

BindingProcessorRuntimeContainer kanzi::BindingSourceRuntime::m_processorRuntimes
protected

Binding processors (for the source, forward direction).

◆ m_bindingRuntime

AbstractBindingRuntime* kanzi::BindingSourceRuntime::m_bindingRuntime
protected

Abstract binding runtime for this source.


The documentation for this class was generated from the following file: