Kanzi 3.9.10
kanzi::VariableBindingTargetRuntime Class Reference

Variable binding target runtime. More...

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

Inheritance diagram for kanzi::VariableBindingTargetRuntime:
[legend]

Public Types

using VariableSourceContainer
 Container for variable sources.
 
- Public Types inherited from kanzi::BindingTargetRuntime
using BindingProcessorRuntimeConstIterator
 Binding processor iterator type.
 
using BindingProcessorRuntimeContainer
 Binding processor container type.
 

Public Member Functions

void addVariableSource (AbstractBindingVariableSource &sourceRuntime)
 Adds a variable binding source runtime.
 
AbstractPropertyType getPropertyType () const
 Gets property type.
 
AbstractBindingVariableSourceremoveLastVariableSource ()
 Removes the last variable source listening on this target.
 
void removeSourceRuntime (AbstractBindingVariableSource &sourceRuntime)
 Removes a variable binding source runtime.
 
virtual ~VariableBindingTargetRuntime ()
 Destructor.
 
- Public Member Functions inherited from kanzi::BindingTargetRuntime
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.
 
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 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.
 

Static Public Member Functions

static BindingTargetRuntimePtr create (AbstractPropertyType propertyType)
 Creates a manual binding target runtime.
 

Protected Member Functions

void attachForReadOverride () override
 BindingTargetRuntime::attachForReadOverride() implementation.
 
void attachForWriteOverride () override
 BindingTargetRuntime::attachForWriteOverride() implementation.
 
void detachOverride () override
 BindingTargetRuntime::detachOverride() implementation.
 
bool isConnectedOverride () override
 BindingTargetRuntime::isConnectedOverride() implementation.
 
bool readOverride (Variant &value) override
 BindingTargetRuntime::readOverride() implementation.
 
 VariableBindingTargetRuntime (AbstractPropertyType propertyType)
 Constructor.
 
- Protected Member Functions inherited from kanzi::BindingTargetRuntime
 BindingTargetRuntime ()=default
 Constructor.
 
virtual bool writeOverride (const Variant &value)=0
 Implementation-dependent write.
 

Protected Attributes

VariableBindingHostm_host
 Variable binding host connected to.
 
AbstractPropertyType m_propertyType
 Property type written.
 
vector< AbstractBindingVariableSource * > m_sourceRuntimes
 Variable binding sources connected.
 
- Protected Attributes inherited from kanzi::BindingTargetRuntime
AbstractBindingRuntimem_bindingRuntime
 Abstract binding runtime for this target.
 
BindingProcessorRuntimeContainer m_processorRuntimes
 Binding processors runtimes (for the target, backward direction).
 

Detailed Description

Variable binding target runtime.

VariableBindingTargetRuntime holds the result of a binding operation as a readable variable.

VariableBindingTargetRuntime is intended to be used with a specific lookup in a binding host that is not a PropertyObject. This enables storing binding results without the overhead of PropertyObject interface.

There is no base value to modify, so VariableBindingTarget cannot write into a property field.

See also
RenderEntry3D
Since
Kanzi 3.9.0

Member Typedef Documentation

◆ VariableSourceContainer

Constructor & Destructor Documentation

◆ ~VariableBindingTargetRuntime()

virtual kanzi::VariableBindingTargetRuntime::~VariableBindingTargetRuntime ( )
virtual

Destructor.

◆ VariableBindingTargetRuntime()

kanzi::VariableBindingTargetRuntime::VariableBindingTargetRuntime ( AbstractPropertyType propertyType)
explicitprotected

Constructor.

Parameters
propertyTypeTarget property type.
Since
Kanzi 3.9.6 Removed BindingLookupContextPtr.

Member Function Documentation

◆ create()

static BindingTargetRuntimePtr kanzi::VariableBindingTargetRuntime::create ( AbstractPropertyType propertyType)
static

Creates a manual binding target runtime.

Parameters
propertyTypeTarget property type.
Returns
The created manual binding target runtime.
Since
Kanzi 3.9.6 Removed BindingLookupContextPtr.

◆ getPropertyType()

AbstractPropertyType kanzi::VariableBindingTargetRuntime::getPropertyType ( ) const
inline

Gets property type.

Required by inheriting classes.

Returns
Property type listened to.

◆ addVariableSource()

void kanzi::VariableBindingTargetRuntime::addVariableSource ( AbstractBindingVariableSource & sourceRuntime)

Adds a variable binding source runtime.

Variable binding source runtimes are notified when the binding target is written.

Parameters
sourceRuntimeSource runtime to add.

◆ removeSourceRuntime()

void kanzi::VariableBindingTargetRuntime::removeSourceRuntime ( AbstractBindingVariableSource & sourceRuntime)

Removes a variable binding source runtime.

Parameters
sourceRuntimeSource runtime to remove.

◆ removeLastVariableSource()

AbstractBindingVariableSource * kanzi::VariableBindingTargetRuntime::removeLastVariableSource ( )

Removes the last variable source listening on this target.

Returns
Pointer to the variable source removed or nullptr.

◆ attachForReadOverride()

void kanzi::VariableBindingTargetRuntime::attachForReadOverride ( )
overrideprotectedvirtual

◆ attachForWriteOverride()

void kanzi::VariableBindingTargetRuntime::attachForWriteOverride ( )
overrideprotectedvirtual

◆ detachOverride()

void kanzi::VariableBindingTargetRuntime::detachOverride ( )
overrideprotectedvirtual

◆ readOverride()

bool kanzi::VariableBindingTargetRuntime::readOverride ( Variant & value)
overrideprotectedvirtual

◆ isConnectedOverride()

bool kanzi::VariableBindingTargetRuntime::isConnectedOverride ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_propertyType

AbstractPropertyType kanzi::VariableBindingTargetRuntime::m_propertyType
protected

Property type written.

◆ m_host

VariableBindingHost* kanzi::VariableBindingTargetRuntime::m_host
protected

Variable binding host connected to.

◆ m_sourceRuntimes

vector<AbstractBindingVariableSource*> kanzi::VariableBindingTargetRuntime::m_sourceRuntimes
protected

Variable binding sources connected.


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