Kanzi  3.9.6
Kanzi Engine API
kanzi::Binding Class Reference

Binding is the simplest form of binding. More...

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

Inheritance diagram for kanzi::Binding:
[legend]

Static Public Member Functions

static BindingSharedPtr create (BindingSourcePtr source)
 Creates a binding. More...
 
static BindingSharedPtr create (string_view sourcePath, AbstractPropertyType sourcePropertyType, PropertyField sourceField)
 Creates a binding. More...
 
static BindingSharedPtr create (string_view sourcePath, AbstractPropertyType sourcePropertyType)
 Creates a binding. More...
 
static BindingSharedPtr create (ResourceID id)
 Creates a resource binding. More...
 

Protected Member Functions

 Binding (BindingSourcePtr source)
 Constructor. More...
 
AbstractBindingRuntimeSharedPtr createRuntimeOverride (AbstractBindingSharedPtr binding, BindingLookupContextPtr sourceLookupContext, BindingTargetRuntimePtr targetRuntime) override
 AbstractBinding::createRuntime() implementation. More...
 
- Protected Member Functions inherited from kanzi::AbstractBinding
 AbstractBinding (BindingSourcePtr source)
 Constructor. More...
 
virtual void addReverseProcessorOverride (BindingProcessorSharedPtr processor)
 Implementation-dependent binding processor add (reverse direction). More...
 
virtual BindingProcessorConstIterator beginReverseProcessorsOverride () const
 Implementation-dependent access to reverse direction binding processors. More...
 
virtual BindingProcessorConstIterator endReverseProcessorsOverride () const
 Implementation-dependent access to reverse direction binding processors. More...
 
virtual void removeReverseProcessorOverride (BindingProcessor &processor)
 Implementation-dependent binding processor remove (reverse direction). More...
 

Additional Inherited Members

- Public Types inherited from kanzi::AbstractBinding
using BindingProcessorConstIterator = BindingProcessorContainer::const_iterator
 Binding processor iterator type. More...
 
using BindingProcessorContainer = vector< BindingProcessorSharedPtr >
 Binding processor container type. More...
 
- Public Member Functions inherited from kanzi::AbstractBinding
void addProcessor (BindingProcessorSharedPtr processor)
 Add a binding processor. More...
 
void addReverseProcessor (BindingProcessorSharedPtr processor)
 Add a binding processor (reverse direction). More...
 
BindingProcessorConstIterator beginProcessors () const
 Gets an iterator to the beginning of binding processors. More...
 
BindingProcessorConstIterator beginReverseProcessors () const
 Gets an iterator to the beginning of reverse direction binding processors. More...
 
AbstractBindingRuntimeSharedPtr createRuntime (AbstractBindingSharedPtr binding, BindingLookupContextPtr sourceLookupContext, BindingTargetRuntimePtr targetRuntime)
 Creates a binding runtime for this binding. More...
 
BindingProcessorConstIterator endProcessors () const
 Gets an iterator to the end of binding processors. More...
 
BindingProcessorConstIterator endReverseProcessors () const
 Gets an iterator to the end of reverse direction binding processors. More...
 
BindingSourcegetSource ()
 Gets the binding source for this binding. More...
 
bool isCreatedFromKZB () const
 Indicates whether the binding is sourced from a KZB? Used to check whether or not to remove the binding during patching. More...
 
void removeProcessor (BindingProcessor &processor)
 Remove a binding processor. More...
 
void removeReverseProcessor (BindingProcessor &processor)
 Remove a binding processor (reverse direction). More...
 
void setCreatedFromKZB (bool flag)
 Sets the created from KZB flag. More...
 
virtual ~AbstractBinding ()=default
 Destructor. More...
 
- Protected Attributes inherited from kanzi::AbstractBinding
bool m_createdFromKZB
 Is the binding sourced from a KZB? This field is used to determine if the binding should be removed during patching. More...
 
BindingProcessorContainer m_processors
 Binding processor (forward direction). More...
 
BindingSourcePtr m_source
 Binding source. More...
 

Detailed Description

Binding is the simplest form of binding.

It performs a copy from source to target without caching the value. To learn more about bindings, see AbstractBinding.

See also
AbstractBinding
Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ Binding()

kanzi::Binding::Binding ( BindingSourcePtr  source)
inlineexplicitprotected

Constructor.

Parameters
sourceBinding source.

Member Function Documentation

◆ create() [1/4]

static BindingSharedPtr kanzi::Binding::create ( BindingSourcePtr  source)
static

Creates a binding.

Parameters
sourceBinding source.
Returns
The created binding.

◆ create() [2/4]

static BindingSharedPtr kanzi::Binding::create ( string_view  sourcePath,
AbstractPropertyType  sourcePropertyType,
PropertyField  sourceField 
)
static

Creates a binding.

Parameters
sourcePathPath to source object.
sourcePropertyTypeSource property type from which to bind.
sourceFieldField of the source property type from which to bind. PropertyFieldWhole for whole property.
Returns
The created binding.

◆ create() [3/4]

static BindingSharedPtr kanzi::Binding::create ( string_view  sourcePath,
AbstractPropertyType  sourcePropertyType 
)
inlinestatic

Creates a binding.

Whole property field will be used.

Parameters
sourcePathPath to source object.
sourcePropertyTypeSource property type from which to bind.
Returns
The created binding.

◆ create() [4/4]

static BindingSharedPtr kanzi::Binding::create ( ResourceID  id)
static

Creates a resource binding.

Parameters
idResource ID.
Returns
The created binding.

◆ createRuntimeOverride()

AbstractBindingRuntimeSharedPtr kanzi::Binding::createRuntimeOverride ( AbstractBindingSharedPtr  binding,
BindingLookupContextPtr  sourceLookupContext,
BindingTargetRuntimePtr  targetRuntime 
)
overrideprotectedvirtual

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