Kanzi 3.9.10
kanzi::TypedValueSourceBindingTargetRuntime< T > Class Template Reference

Specialized binding target for value sources where the binding target itself is the value source. More...

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

Inheritance diagram for kanzi::TypedValueSourceBindingTargetRuntime< T >:
[legend]

Public Member Functions

PropertyTypeDescriptor< T >::TypedValueSource * getValueSource ()
 Returns a pointer to a value source.
 
const PropertyTypeDescriptor< T >::TypedValueSource * getValueSource () const
 Returns a pointer to a value source.
 
 ~TypedValueSourceBindingTargetRuntime () override
 Destructor.
 
- Public Member Functions inherited from kanzi::ValueSourceBindingTargetRuntime
void clearValueSourceOwner ()
 Clears the value source owner.
 
PropertyValuePrecedence getPrecedence () const
 Gets value source precedence.
 
PropertyField getPropertyField () const
 Gets a property field.
 
AbstractPropertyType getPropertyType () const
 Gets a property type.
 
bool hasValueSourceOwner () const
 Indicates whether this target runtime still has a value source owner.
 
- Public Member Functions inherited from kanzi::BindingTargetRuntime
void attachForRead ()
 Attaches the binding target runtime for reading.
 
void attachForWrite ()
 Attaches the binding target runtime for writing.
 
BindingProcessorRuntimeConstIterator beginProcessorRuntimes () const
 Gets an iterator to the beginning of binding processor runtimes.
 
void createBindingProcessorsRuntimes (const AbstractBinding &binding)
 Creates a processor runtime for each BindingProcessor held by the binding parameter.
 
void detach ()
 Detaches binding target runtime.
 
BindingProcessorRuntimeConstIterator endProcessorRuntimes () const
 Gets an iterator to the end of binding processor runtimes.
 
AbstractBindingRuntimegetBindingRuntime () const
 Gets the binding runtime.
 
BindingLookupContextgetLookupContext () const
 Gets the lookup context.
 
bool isConnected ()
 Indicates whether this source is connected.
 
bool read (Variant &value)
 Reads a value from the binding target.
 
void setBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Sets the binding runtime.
 
bool write (const Variant &value)
 Writes a value to the binding target.
 
virtual ~BindingTargetRuntime ()=default
 Destructor.
 

Static Public Member Functions

static BindingTargetRuntimePtr create (AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence, bool reuseAllowed, BindingLookupContext &lookupContext)
 Create a typed value source binding target runtime.
 
- Static Public Member Functions inherited from kanzi::ValueSourceBindingTargetRuntime
static BindingTargetRuntimePtr create (AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence, bool reuseAllowed, BindingLookupContext &lookupContext)
 Creates a value source binding target runtime without an actual binding target.
 

Protected Types

using ObjectPropertyListenerType
 Type name for object property listener.
 

Protected Member Functions

void attachForReadOverride () override
 BindingTargetRuntime::attachForReadOverride() implementation.
 
void attachForWriteOverride () override
 BindingTargetRuntime::attachForWriteOverride() implementation.
 
void attachValueSource (bool reuseAllowed, BindingLookupContext &lookupContext)
 Attaches the value source owner.
 
void detachOverride () override
 BindingTargetRuntime::detachOverride() implementation.
 
void detachValueSource ()
 Detaches the value source installed by this value source binding target runtime.
 
T getInitialValue () const
 Gets the initial value of a property type.
 
bool isConnectedOverride () override
 BindingTargetRuntime::isConnectedOverride() implementation.
 
void localPropertyChange () override
 ObjectPropertyListenerImpl::localPropertyChange() implementation.
 
bool readOverride (Variant &value) override
 BindingTargetRuntime::readOverride() implementation.
 
 TypedValueSourceBindingTargetRuntime (AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence, bool reuseAllowed, BindingLookupContext &lookupContext)
 Constructor.
 
bool writeOverride (const Variant &value) override
 BindingTargetRuntime::writeOverride() implementation.
 
- Protected Member Functions inherited from kanzi::ValueSourceBindingTargetRuntime
 ValueSourceBindingTargetRuntime (AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence, PropertyObject *object)
 Constructor.
 
- Protected Member Functions inherited from kanzi::BindingTargetRuntime
 BindingTargetRuntime ()=default
 Constructor.
 
- Protected Member Functions inherited from kanzi::ObjectPropertyListenerImpl< T, PropertyObject *, PropertyObject & >
void attachLocalPropertyListener (PropertyObject & object, AbstractPropertyType propertyType)
 Installs local property listener.
 
void clearLocalPropertyListener ()
 Clears the property listener object.
 
void detachLocalPropertyListener (AbstractPropertyType propertyType)
 Uninstalls local property listener.
 
PropertyObjectgetLocalPropertyListenerObject () const
 Gets the property object with a local property listener installed.
 
bool isLocalPropertyListenerInstalled () const
 Tells whether a local property listener has been installed.
 
 ObjectPropertyListenerImpl ()=default
 Constructor.
 
 ~ObjectPropertyListenerImpl ()
 Destructor.
 

Protected Attributes

bool m_reuseAllowed
 Whether reuse of the installed value source is allowed by other functionality, such as setProperty.
 
PropertyTypeDescriptor< T >::TypedValueSource m_valueSource
 Value source.
 
- Protected Attributes inherited from kanzi::ValueSourceBindingTargetRuntime
PropertyField m_field
 Property field to use.
 
bool m_localReadListenerRequested
 Indicates whether the local read listener is requested.
 
PropertyObjectm_object
 Object the value source is installed to.
 
PropertyValuePrecedence m_precedence
 Precedence to use.
 
AbstractPropertyType m_propertyType
 Property type to use.
 
AbstractPropertyTypeDescriptor::ValueSourceOwnerm_valueSourceOwner
 Owner for the binding value source this runtime installs.
 
- Protected Attributes inherited from kanzi::BindingTargetRuntime
AbstractBindingRuntimem_bindingRuntime
 Abstract binding runtime for this target.
 
BindingProcessorRuntimeContainer m_processorRuntimes
 Binding processors runtimes (for the target, backward direction).
 
- Protected Attributes inherited from kanzi::ObjectPropertyListenerImpl< T, PropertyObject *, PropertyObject & >
PropertyObjectm_localPropertyListenerObject
 The object to which the local property listener has been installed.
 

Additional Inherited Members

- Public Types inherited from kanzi::BindingTargetRuntime
using BindingProcessorRuntimeConstIterator
 Binding processor iterator type.
 
using BindingProcessorRuntimeContainer
 Binding processor container type.
 
- Static Protected Member Functions inherited from kanzi::ObjectPropertyListenerImpl< T, PropertyObject *, PropertyObject & >
static void localPropertyChangeCallback (PropertyObject &, const T &, PropertyNotificationReason reason, void *userData)
 Property change callback for object property.
 

Detailed Description

template<typename T>
class kanzi::TypedValueSourceBindingTargetRuntime< T >

Specialized binding target for value sources where the binding target itself is the value source.

Since
Kanzi 3.7.0

Member Typedef Documentation

◆ ObjectPropertyListenerType

template<typename T >
using kanzi::TypedValueSourceBindingTargetRuntime< T >::ObjectPropertyListenerType
protected

Type name for object property listener.

Constructor & Destructor Documentation

◆ ~TypedValueSourceBindingTargetRuntime()

◆ TypedValueSourceBindingTargetRuntime()

template<typename T >
kanzi::TypedValueSourceBindingTargetRuntime< T >::TypedValueSourceBindingTargetRuntime ( AbstractPropertyType propertyType,
PropertyField field,
PropertyValuePrecedence precedence,
bool reuseAllowed,
BindingLookupContext & lookupContext )
inlineexplicitprotected

Constructor.

Parameters
propertyTypeProperty type to use.
fieldProperty field to use.
precedencePrecedence to use.
reuseAllowedIs reuse of the installed value source allowed by other functionality, such as setProperty?
lookupContextThe lookup context to use for getting the target object.
Since
Kanzi 3.9.6 Removed BindingLookupContextPtr, added PropertyObject.

Member Function Documentation

◆ create()

template<typename T >
static BindingTargetRuntimePtr kanzi::TypedValueSourceBindingTargetRuntime< T >::create ( AbstractPropertyType propertyType,
PropertyField field,
PropertyValuePrecedence precedence,
bool reuseAllowed,
BindingLookupContext & lookupContext )
inlinestatic

Create a typed value source binding target runtime.

Parameters
propertyTypeProperty type to use.
fieldProperty field to use.
precedencePrecedence to use.
reuseAllowedIs reuse of the installed value source allowed by other functionality, such as setProperty?
lookupContextThe lookup context to use for getting the target object.
Returns
The created typed value source binding target runtime.
Since
Kanzi 3.9.6 Changed BindingLookupContextPtr to BindingLookupContext&.

◆ getValueSource() [1/2]

template<typename T >
PropertyTypeDescriptor< T >::TypedValueSource * kanzi::TypedValueSourceBindingTargetRuntime< T >::getValueSource ( )
inline

Returns a pointer to a value source.

Returns
Pointer to the value source.

◆ getValueSource() [2/2]

template<typename T >
const PropertyTypeDescriptor< T >::TypedValueSource * kanzi::TypedValueSourceBindingTargetRuntime< T >::getValueSource ( ) const
inline

Returns a pointer to a value source.

Returns
Pointer to the value source.

◆ attachForReadOverride()

template<typename T >
void kanzi::TypedValueSourceBindingTargetRuntime< T >::attachForReadOverride ( )
inlineoverrideprotectedvirtual

◆ attachForWriteOverride()

template<typename T >
void kanzi::TypedValueSourceBindingTargetRuntime< T >::attachForWriteOverride ( )
inlineoverrideprotectedvirtual

◆ detachOverride()

template<typename T >
void kanzi::TypedValueSourceBindingTargetRuntime< T >::detachOverride ( )
inlineoverrideprotectedvirtual

◆ isConnectedOverride()

template<typename T >
bool kanzi::TypedValueSourceBindingTargetRuntime< T >::isConnectedOverride ( )
inlineoverrideprotectedvirtual

◆ readOverride()

template<typename T >
bool kanzi::TypedValueSourceBindingTargetRuntime< T >::readOverride ( Variant & value)
inlineoverrideprotectedvirtual

◆ writeOverride()

template<typename T >
bool kanzi::TypedValueSourceBindingTargetRuntime< T >::writeOverride ( const Variant & value)
inlineoverrideprotectedvirtual

◆ localPropertyChange()

◆ attachValueSource()

template<typename T >
void kanzi::TypedValueSourceBindingTargetRuntime< T >::attachValueSource ( bool reuseAllowed,
BindingLookupContext & lookupContext )
inlineprotected

Attaches the value source owner.

Initial value is the topmost value source value prior to attachment.

Parameters
reuseAllowedIs reuse of the installed value source allowed by other functionality, such as setProperty?
lookupContextThe binding lookup context.
Since
Kanzi 3.9.6 Added BindingLookupContextPtr.

◆ detachValueSource()

template<typename T >
void kanzi::TypedValueSourceBindingTargetRuntime< T >::detachValueSource ( )
inlineprotected

Detaches the value source installed by this value source binding target runtime.

If value source is not installed, this function does not do anything.

◆ getInitialValue()

template<typename T >
T kanzi::TypedValueSourceBindingTargetRuntime< T >::getInitialValue ( ) const
inlineprotected

Gets the initial value of a property type.

If node is not available, uses either node fetch or object.

Returns
Value to use as an initial value for the value source.

Member Data Documentation

◆ m_valueSource

template<typename T >
PropertyTypeDescriptor<T>::TypedValueSource kanzi::TypedValueSourceBindingTargetRuntime< T >::m_valueSource
protected

Value source.

◆ m_reuseAllowed

template<typename T >
bool kanzi::TypedValueSourceBindingTargetRuntime< T >::m_reuseAllowed
protected

Whether reuse of the installed value source is allowed by other functionality, such as setProperty.


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