Kanzi 3.9.10
kanzi::VariableBindingHost Class Reference

Binding variable host. More...

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

Inheritance diagram for kanzi::VariableBindingHost:
[legend]

Public Types

using BindingRuntimeConstIterator
 Const iterator for binding runtimes.
 
using BindingRuntimeContainer
 Binding runtime container.
 
using BindingRuntimeIterator
 Iterator for binding runtimes.
 
using BindingTargetMapping
 Binding target mapping.
 

Public Member Functions

void addAvailableVariableSource (AbstractBindingVariableSource &variableSource)
 Add a variable source to the list of available sources.
 
void addBindingRuntime (AbstractBindingRuntimeSharedPtr bindingRuntime)
 Adds a binding runtime to the list of binding runtimes.
 
void addVariableTarget (VariableBindingTargetRuntime &targetRuntime)
 Adds variable binding target runtime into the variable host.
 
BindingRuntimeIterator beginBindingRuntimes ()
 Gets an iterator to the beginning of binding runtimes.
 
BindingRuntimeConstIterator beginBindingRuntimes () const
 Gets an iterator to the beginning of binding runtimes.
 
BindingRuntimeIterator endBindingRuntimes ()
 Gets an iterator to the end of binding runtimes.
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Gets an iterator to the end of binding runtimes.
 
BindingRuntimeIterator endFixedRuntimes ()
 Gets an iterator to the end of fixed binding runtimes.
 
BindingRuntimeConstIterator endFixedRuntimes () const
 Gets an iterator to the end of fixed binding runtimes.
 
VariableBindingTargetRuntimegetVariableBindingTargetRuntime (AbstractPropertyType propertyType)
 Gets an existing variable binding target runtime based on a property type.
 
void removeAvailableVariableSource (AbstractBindingVariableSource &variableSource)
 Remove a variable source from the list of available sources.
 
void removeBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Removes a binding runtime.
 
void removeVariableTarget (VariableBindingTargetRuntime &targetRuntime)
 Removes a variable binding target from the variable host.
 
 ~VariableBindingHost ()
 Destructor.
 

Detailed Description

Binding variable host.

An alternative binding host that contains binding runtimes, but does not set bindings to property objects.

Contains separate storage for VariableBindingTargetRuntimes, so the lookup for ##Self in binding lookup can access variables by property type.

Member Typedef Documentation

◆ BindingRuntimeContainer

◆ BindingRuntimeIterator

◆ BindingRuntimeConstIterator

Const iterator for binding runtimes.

◆ BindingTargetMapping

Constructor & Destructor Documentation

◆ ~VariableBindingHost()

kanzi::VariableBindingHost::~VariableBindingHost ( )

Destructor.

Member Function Documentation

◆ addBindingRuntime()

void kanzi::VariableBindingHost::addBindingRuntime ( AbstractBindingRuntimeSharedPtr bindingRuntime)

Adds a binding runtime to the list of binding runtimes.

Internally holds the order so binding runtimes with fixed operations go to the front.

Parameters
bindingRuntimeBinding runtime to add.

◆ removeBindingRuntime()

void kanzi::VariableBindingHost::removeBindingRuntime ( AbstractBindingRuntime & bindingRuntime)

Removes a binding runtime.

Parameters
bindingRuntimeBinding runtime to remove.

◆ addVariableTarget()

void kanzi::VariableBindingHost::addVariableTarget ( VariableBindingTargetRuntime & targetRuntime)

Adds variable binding target runtime into the variable host.

May cause removal of existing bindings if the target property already has a variable associated.

Parameters
targetRuntimeTarget runtime to add.

◆ removeVariableTarget()

void kanzi::VariableBindingHost::removeVariableTarget ( VariableBindingTargetRuntime & targetRuntime)

Removes a variable binding target from the variable host.

Parameters
targetRuntimeTarget runtime to remove.

◆ getVariableBindingTargetRuntime()

VariableBindingTargetRuntime * kanzi::VariableBindingHost::getVariableBindingTargetRuntime ( AbstractPropertyType propertyType)

Gets an existing variable binding target runtime based on a property type.

Parameters
propertyTypeProperty type to look with.
Returns
Binding target runtime corresponding to the property type.

◆ addAvailableVariableSource()

void kanzi::VariableBindingHost::addAvailableVariableSource ( AbstractBindingVariableSource & variableSource)

Add a variable source to the list of available sources.

Throws an error if the source is already in the list of available sources.

Parameters
variableSourceVariable source that is not connected to a variable target.

◆ removeAvailableVariableSource()

void kanzi::VariableBindingHost::removeAvailableVariableSource ( AbstractBindingVariableSource & variableSource)

Remove a variable source from the list of available sources.

Throws an error if the source is not in the list of available sources.

Parameters
variableSourceVariable source to remove.

◆ beginBindingRuntimes() [1/2]

BindingRuntimeIterator kanzi::VariableBindingHost::beginBindingRuntimes ( )
inline

Gets an iterator to the beginning of binding runtimes.

Returns
Iterator to the beginning of runtimes.

◆ beginBindingRuntimes() [2/2]

BindingRuntimeConstIterator kanzi::VariableBindingHost::beginBindingRuntimes ( ) const
inline

Gets an iterator to the beginning of binding runtimes.

Returns
Const iterator to the beginning of runtimes.

◆ endBindingRuntimes() [1/2]

BindingRuntimeIterator kanzi::VariableBindingHost::endBindingRuntimes ( )
inline

Gets an iterator to the end of binding runtimes.

Returns
Iterator to the end of runtimes.

◆ endBindingRuntimes() [2/2]

BindingRuntimeConstIterator kanzi::VariableBindingHost::endBindingRuntimes ( ) const
inline

Gets an iterator to the end of binding runtimes.

Returns
Const iterator to the end of runtimes.

◆ endFixedRuntimes() [1/2]

BindingRuntimeIterator kanzi::VariableBindingHost::endFixedRuntimes ( )
inline

Gets an iterator to the end of fixed binding runtimes.

Returns
Iterator to the end of fixed runtimes.

◆ endFixedRuntimes() [2/2]

BindingRuntimeConstIterator kanzi::VariableBindingHost::endFixedRuntimes ( ) const
inline

Gets an iterator to the end of fixed binding runtimes.

Returns
Const iterator to the end of fixed runtimes.

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