Kanzi  3.9.6
Kanzi Engine API
kanzi::ManualBindingSource Class Reference

Manual binding source. More...

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

Inheritance diagram for kanzi::ManualBindingSource:
[legend]

Public Member Functions

string getPath () const
 Gets the source object path. More...
 
PropertyField getPropertyField () const
 Gets the source property field. More...
 
AbstractPropertyType getPropertyType () const
 Gets the source property type. More...
 
- Public Member Functions inherited from kanzi::BindingSource
BindingSourceRuntimePtr createRuntime (BindingLookupContextPtr lookupContext)
 Creates binding source runtime. More...
 
virtual ~BindingSource ()
 Destructor. More...
 

Static Public Member Functions

static BindingSourcePtr create (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Creates a manual binding source. More...
 

Protected Member Functions

BindingSourceRuntimePtr createRuntimeOverride (BindingLookupContextPtr lookupContext) override
 BindingSource::createRuntime implementation. More...
 
 ManualBindingSource (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::BindingSource
 BindingSource ()
 Constructor. More...
 

Protected Attributes

PropertyField m_field
 Source property field. More...
 
string m_path
 Path to object. More...
 
AbstractPropertyType m_propertyType
 Source property type. More...
 

Detailed Description

Manual binding source.

ManualBindingSource works like ObjectPropertyBindingSource, reading values from Node or RenderPass objects, but does not connect or install any listeners. Property changes cannot cause the binding to be executed.

Kanzi Engine uses ManualBindingSource internally with actions and triggers, utilizing ManualBinding.

Creating a manual binding source

To create a manual binding source:

// Create a manual binding source.

Because property changes do not cause the binding to be executed, ManualBindingSourceRuntime would only read the value once when used with regular bindings - when the binding runtime is first attached. When used with ManualBinding, it would only read values when the binding runtime is explicitly updated.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ ManualBindingSource()

kanzi::ManualBindingSource::ManualBindingSource ( string_view  path,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inlineprotected

Constructor.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.

Member Function Documentation

◆ create()

static BindingSourcePtr kanzi::ManualBindingSource::create ( string_view  path,
AbstractPropertyType  propertyType,
PropertyField  field 
)
static

Creates a manual binding source.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.

◆ getPath()

string kanzi::ManualBindingSource::getPath ( ) const
inline

Gets the source object path.

Returns
Path to object.

◆ getPropertyType()

AbstractPropertyType kanzi::ManualBindingSource::getPropertyType ( ) const
inline

Gets the source property type.

Returns
Property type.

◆ getPropertyField()

PropertyField kanzi::ManualBindingSource::getPropertyField ( ) const
inline

Gets the source property field.

Returns
Property field.

◆ createRuntimeOverride()

BindingSourceRuntimePtr kanzi::ManualBindingSource::createRuntimeOverride ( BindingLookupContextPtr  lookupContext)
overrideprotectedvirtual

Member Data Documentation

◆ m_path

string kanzi::ManualBindingSource::m_path
protected

Path to object.

◆ m_propertyType

AbstractPropertyType kanzi::ManualBindingSource::m_propertyType
protected

Source property type.

◆ m_field

PropertyField kanzi::ManualBindingSource::m_field
protected

Source property field.


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