Kanzi  3.9.7
Kanzi Engine API
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 = BindingRuntimeContainer::const_iterator
 Const iterator for binding runtimes. More...
 
using BindingRuntimeContainer = vector< AbstractBindingRuntimeSharedPtr >
 Binding runtime container. More...
 
using BindingRuntimeIterator = BindingRuntimeContainer::iterator
 Iterator for binding runtimes. More...
 
using BindingTargetMapping = flat_map< AbstractPropertyType, VariableBindingTargetRuntime * >
 Binding target mapping. More...
 

Public Member Functions

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

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

using kanzi::VariableBindingHost::BindingRuntimeIterator = BindingRuntimeContainer::iterator

Iterator for binding runtimes.

using kanzi::VariableBindingHost::BindingRuntimeConstIterator = BindingRuntimeContainer::const_iterator

Const iterator for binding runtimes.

Constructor & Destructor Documentation

kanzi::VariableBindingHost::~VariableBindingHost ( )

Destructor.

Member Function Documentation

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.
void kanzi::VariableBindingHost::removeBindingRuntime ( AbstractBindingRuntime bindingRuntime)

Removes a binding runtime.

Parameters
bindingRuntimeBinding runtime to remove.
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.
void kanzi::VariableBindingHost::removeVariableTarget ( VariableBindingTargetRuntime targetRuntime)

Removes a variable binding target from the variable host.

Parameters
targetRuntimeTarget runtime to remove.
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.
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.
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.
BindingRuntimeIterator kanzi::VariableBindingHost::beginBindingRuntimes ( )
inline

Gets an iterator to the beginning of binding runtimes.

Returns
Iterator to the beginning of runtimes.
BindingRuntimeConstIterator kanzi::VariableBindingHost::beginBindingRuntimes ( ) const
inline

Gets an iterator to the beginning of binding runtimes.

Returns
Const iterator to the beginning of runtimes.
BindingRuntimeIterator kanzi::VariableBindingHost::endBindingRuntimes ( )
inline

Gets an iterator to the end of binding runtimes.

Returns
Iterator to the end of runtimes.
BindingRuntimeConstIterator kanzi::VariableBindingHost::endBindingRuntimes ( ) const
inline

Gets an iterator to the end of binding runtimes.

Returns
Const iterator to the end of runtimes.
BindingRuntimeIterator kanzi::VariableBindingHost::endFixedRuntimes ( )
inline

Gets an iterator to the end of fixed binding runtimes.

Returns
Iterator to the end of fixed runtimes.
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: