Kanzi  3.9.5
Kanzi Engine API
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 = vector< AbstractBindingVariableSource * >
 Container for variable sources. More...
 
- Public Types inherited from kanzi::BindingTargetRuntime
using BindingProcessorRuntimeConstIterator = BindingProcessorRuntimeContainer::const_iterator
 Binding processor iterator type. More...
 
using BindingProcessorRuntimeContainer = vector< BindingProcessorRuntimePtr >
 Binding processor container type. More...
 

Public Member Functions

void addVariableSource (AbstractBindingVariableSource &sourceRuntime)
 Adds a variable binding source runtime. More...
 
AbstractPropertyType getPropertyType () const
 Gets property type. More...
 
AbstractBindingVariableSourceremoveLastVariableSource ()
 Removes the last variable source listening on this target. More...
 
void removeSourceRuntime (AbstractBindingVariableSource &sourceRuntime)
 Removes a variable binding source runtime. More...
 
virtual ~VariableBindingTargetRuntime ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::BindingTargetRuntime
void attachForRead ()
 Attaches the binding target runtime for reading. More...
 
void attachForWrite ()
 Attaches the binding target runtime for writing. More...
 
BindingProcessorRuntimeConstIterator beginProcessorRuntimes () const
 Gets an iterator to the beginning of binding processor runtimes. More...
 
void createBindingProcessorsRuntimes (const AbstractBinding &binding)
 Creates a processor runtime for each BindingProcessor held by the binding parameter. More...
 
void detach ()
 Detaches binding target runtime. More...
 
BindingProcessorRuntimeConstIterator endProcessorRuntimes () const
 Gets an iterator to the end of binding processor runtimes. More...
 
AbstractBindingRuntimegetBindingRuntime () const
 Gets the binding runtime. More...
 
BindingLookupContextgetLookupContext () const
 Accesses target lookup context. More...
 
bool isConnected ()
 Indicates whether this source is connected. More...
 
bool read (Variant &value)
 Reads a value from the binding target. More...
 
void setBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Sets the binding runtime. More...
 
bool write (const Variant &value)
 Writes a value to the binding target. More...
 
virtual ~BindingTargetRuntime ()=default
 Destructor. More...
 

Static Public Member Functions

static BindingTargetRuntimePtr create (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType)
 Creates a manual binding target runtime. More...
 

Protected Member Functions

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

Protected Attributes

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

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 ( BindingLookupContextPtr  lookupContext,
AbstractPropertyType  propertyType 
)
protected

Constructor.

Parameters
lookupContextBinding lookup context to use.
propertyTypeTarget property type.

Member Function Documentation

◆ create()

static BindingTargetRuntimePtr kanzi::VariableBindingTargetRuntime::create ( BindingLookupContextPtr  lookupContext,
AbstractPropertyType  propertyType 
)
static

Creates a manual binding target runtime.

Parameters
lookupContextLookup context for this binding target runtime.
propertyTypeTarget property type.
Returns
The created manual binding target runtime.

◆ 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: