Kanzi 3.9.10
kanzi::ObjectPropertyBindingSource Class Reference

Object property binding source. More...

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

Inheritance diagram for kanzi::ObjectPropertyBindingSource:
[legend]

Public Member Functions

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

Static Public Member Functions

static BindingSourcePtr create (string_view path, AbstractPropertyType propertyType)
 Creates an object property binding source.
 
static BindingSourcePtr create (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Creates an object property binding source.
 

Protected Member Functions

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

Protected Attributes

PropertyField m_field
 Property field to read.
 
string m_path
 Path to object to listen to.
 
AbstractPropertyType m_propertyType
 Property type to read.
 

Detailed Description

Object property binding source.

Use object property binding sources to read property values from Node or RenderPass objects.

Creating an object property binding source

To create an object property binding source:

// Create a binding source that reads a property from a sibling node named siblingNode.
BindingSourcePtr source = ObjectPropertyBindingSource::create("../siblingNode", Node2D::OpacityProperty);

Considerations

To read property values, the source object must be available and have the corresponding property.

If the ObjectPropertyBindingSourceRuntime cannot be connected, it installs listeners to try to reconnect when the node tree or render pass tree changes.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ ObjectPropertyBindingSource()

kanzi::ObjectPropertyBindingSource::ObjectPropertyBindingSource ( string_view path,
AbstractPropertyType propertyType,
PropertyField field )
inlineexplicitprotected

Constructor.

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

Member Function Documentation

◆ create() [1/2]

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

Creates an object property binding source.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.
Returns
The created object property binding source.

◆ create() [2/2]

static BindingSourcePtr kanzi::ObjectPropertyBindingSource::create ( string_view path,
AbstractPropertyType propertyType )
inlinestatic

Creates an object property binding source.

Whole property will be read.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
Returns
The created object property binding source.

◆ getPath()

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

Gets the source object path.

Returns
Path to object.

◆ getPropertyType()

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

Gets the source property type.

Returns
Property type.

◆ getPropertyField()

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

Gets the source property field.

Returns
property field.

◆ createRuntimeOverride()

BindingSourceRuntimePtr kanzi::ObjectPropertyBindingSource::createRuntimeOverride ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_path

string kanzi::ObjectPropertyBindingSource::m_path
protected

Path to object to listen to.

◆ m_propertyType

AbstractPropertyType kanzi::ObjectPropertyBindingSource::m_propertyType
protected

Property type to read.

◆ m_field

PropertyField kanzi::ObjectPropertyBindingSource::m_field
protected

Property field to read.


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