Kanzi 3.9.10
kanzi::BindingHostConceptImpl< TDerivedClass > Class Template Reference

Implementation class for BindingHostConcept. More...

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

Inheritance diagram for kanzi::BindingHostConceptImpl< TDerivedClass >:
[legend]

Public Member Functions

void addBindingRuntime (AbstractBindingRuntimeSharedPtr entry, shared_ptr< void > owner)
 Adds an already-created binding runtime to this binding host.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot)
 Sets a binding with no target.
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Sets a binding to a certain property.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding.
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding.
 
- Public Member Functions inherited from kanzi::BindingHostConcept
BindingRuntimeConstIterator beginBindingRuntimes () const
 Returns an iterator to the beginning of binding runtimes.
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Returns an iterator to the end of binding runtimes.
 
AbstractBindingRuntimeSharedPtr getBindingRuntime (size_t idx)
 Gets binding by index.
 
size_t getBindingRuntimeCount () const
 Gets the number of binding runtimes added to this node.
 
void removeAllBindings ()
 Removes all binding runtimes.
 
void removeBinding (BindingRuntimeHandle &bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner.
 

Protected Member Functions

TDerivedClassgetThisObject ()
 Internal accessor for the Curiously Recurring Template Pattern.
 
const TDerivedClassgetThisObject () const
 Internal accessor for the Curiously Recurring Template Pattern.
 
- Protected Member Functions inherited from kanzi::BindingHostConcept
void attachBindings ()
 Attach all bindings stored in this object.
 
void detachBindings ()
 Detach bindings.
 

Additional Inherited Members

- Public Types inherited from kanzi::BindingHostConcept
using BindingHostConceptSharedPtr
 Binding host concept shared pointer type.
 
using BindingRuntimeConstIterator
 Const iterator for binding runtimes.
 
using BindingRuntimeContainer
 Container for binding runtimes.
 
using BindingRuntimeIterator
 Iterator for binding runtimes.
 
- Protected Attributes inherited from kanzi::BindingHostConcept
BindingRuntimeContainer m_bindingRuntimes
 Bindings in this object.
 

Detailed Description

template<typename TDerivedClass>
class kanzi::BindingHostConceptImpl< TDerivedClass >

Implementation class for BindingHostConcept.

Specifies interface to set bindings to the properties while adding them to the binding host.

Classes using bindings must inherit this class while specializing with their class name.

Since
Kanzi 3.9.0

Member Function Documentation

◆ setBindingWithOwner() [1/5]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyField field,
PropertyValuePrecedence precedence )
inline

Sets a binding to a certain property.

Using PropertyValuePrecedenceLocal erases earlier local value or binding to the property.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBindingWithOwner() [2/5]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
AbstractPropertyType propertyType,
PropertyField field,
PropertyValuePrecedence precedence )
inline

Wrapper for setting a binding with owner.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBindingWithOwner() [3/5]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
AbstractPropertyType propertyType )
inline

Wrapper for setting a binding with owner.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [1/9]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr binding,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyField field,
PropertyValuePrecedence precedence )
inline

Wrapper for setting a binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [2/9]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr binding,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyField field )
inline

Wrapper for setting a binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [3/9]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr binding,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyValuePrecedence precedence )
inline

Wrapper for setting a binding.

Whole property is used.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [4/9]

Wrapper for setting a binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [5/9]

Wrapper for setting a binding.

Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [6/9]

Wrapper for setting a binding.

Whole property is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [7/9]

Wrapper for setting a binding.

Whole property is used. Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBindingWithOwner() [4/5]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
shared_ptr< TDerivedClass > templateRoot )
inline

Sets a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBindingWithOwner() [5/5]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner )
inline

Wrapper for setting a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [8/9]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr binding,
shared_ptr< TDerivedClass > templateRoot )
inline

Sets a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setBinding() [9/9]

Wrapper for setting a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBindingWithOwner() [1/3]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyField field )
inline

Sets a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBindingWithOwner() [2/3]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
AbstractPropertyType propertyType,
PropertyField field )
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBindingWithOwner() [3/3]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr binding,
shared_ptr< void > owner,
AbstractPropertyType propertyType )
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBinding() [1/3]

template<typename TDerivedClass >
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBinding ( AbstractBindingSharedPtr binding,
shared_ptr< TDerivedClass > templateRoot,
AbstractPropertyType propertyType,
PropertyField field )
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBinding() [2/3]

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ setModifierBinding() [3/3]

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding. Whole property is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.

◆ addBindingRuntime()

template<typename TDerivedClass >
void kanzi::BindingHostConceptImpl< TDerivedClass >::addBindingRuntime ( AbstractBindingRuntimeSharedPtr entry,
shared_ptr< void > owner )
inline

Adds an already-created binding runtime to this binding host.

This is an internal function that is only exposed in the public interface for use in tests. Do not call this function. Use setBinding() or setModifierBinding() instead.

Parameters
entryBinding runtime to add.
ownerOwner shared pointer for the binding.

◆ getThisObject() [1/2]

template<typename TDerivedClass >
TDerivedClass * kanzi::BindingHostConceptImpl< TDerivedClass >::getThisObject ( )
inlineprotected

Internal accessor for the Curiously Recurring Template Pattern.

Returns
Derived instance of this.

◆ getThisObject() [2/2]

template<typename TDerivedClass >
const TDerivedClass * kanzi::BindingHostConceptImpl< TDerivedClass >::getThisObject ( ) const
inlineprotected

Internal accessor for the Curiously Recurring Template Pattern.

Returns
Const derived instance of this.

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