Binding variable host. More...
#include <kanzi/core.ui/binding/variable_binding_host.hpp>
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... | |
VariableBindingTargetRuntime * | getVariableBindingTargetRuntime (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... | |
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.
Binding runtime container.
using kanzi::VariableBindingHost::BindingRuntimeIterator = BindingRuntimeContainer::iterator |
Iterator for binding runtimes.
using kanzi::VariableBindingHost::BindingRuntimeConstIterator = BindingRuntimeContainer::const_iterator |
Const iterator for binding runtimes.
using kanzi::VariableBindingHost::BindingTargetMapping = flat_map<AbstractPropertyType, VariableBindingTargetRuntime*> |
Binding target mapping.
kanzi::VariableBindingHost::~VariableBindingHost | ( | ) |
Destructor.
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.
bindingRuntime | Binding runtime to add. |
void kanzi::VariableBindingHost::removeBindingRuntime | ( | AbstractBindingRuntime & | bindingRuntime | ) |
Removes a binding runtime.
bindingRuntime | Binding 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.
targetRuntime | Target runtime to add. |
void kanzi::VariableBindingHost::removeVariableTarget | ( | VariableBindingTargetRuntime & | targetRuntime | ) |
Removes a variable binding target from the variable host.
targetRuntime | Target runtime to remove. |
VariableBindingTargetRuntime* kanzi::VariableBindingHost::getVariableBindingTargetRuntime | ( | AbstractPropertyType | propertyType | ) |
Gets an existing variable binding target runtime based on a property type.
propertyType | Property type to look with. |
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.
variableSource | Variable 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.
variableSource | Variable source to remove. |
|
inline |
Gets an iterator to the beginning of binding runtimes.
|
inline |
Gets an iterator to the beginning of binding runtimes.
|
inline |
Gets an iterator to the end of binding runtimes.
|
inline |
Gets an iterator to the end of binding runtimes.
|
inline |
Gets an iterator to the end of fixed binding runtimes.
|
inline |
Gets an iterator to the end of fixed binding runtimes.