Kanzi  3.9.6
Kanzi Engine API
kanzi::TypedVariableBindingTargetRuntime< T > Class Template Reference

Typed runtime for variable binding target. More...

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

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

Public Member Functions

bool hasValue () const
 Indicates whether the value has been set. More...
 
bool writeToVariant (Variant &value)
 Writes the contents of this target runtime to the given variant. More...
 
- Public Member Functions inherited from kanzi::VariableBindingTargetRuntime
void addVariableSource (AbstractBindingVariableSource &sourceRuntime)
 Adds a variable binding source runtime. More...
 
AbstractPropertyType getPropertyType () const
 Gets property type. More...
 
AbstractBindingVariableSourceremoveLastVariableSource ()
 Removes the last variable source listening on this target. More...
 
void removeSourceRuntime (AbstractBindingVariableSource &sourceRuntime)
 Removes a variable binding source runtime. More...
 
virtual ~VariableBindingTargetRuntime ()
 Destructor. More...
 
- Public Member Functions inherited from kanzi::BindingTargetRuntime
void attachForRead ()
 Attaches the binding target runtime for reading. More...
 
void attachForWrite ()
 Attaches the binding target runtime for writing. More...
 
BindingProcessorRuntimeConstIterator beginProcessorRuntimes () const
 Gets an iterator to the beginning of binding processor runtimes. More...
 
void createBindingProcessorsRuntimes (const AbstractBinding &binding)
 Creates a processor runtime for each BindingProcessor held by the binding parameter. More...
 
void detach ()
 Detaches binding target runtime. More...
 
BindingProcessorRuntimeConstIterator endProcessorRuntimes () const
 Gets an iterator to the end of binding processor runtimes. More...
 
AbstractBindingRuntimegetBindingRuntime () const
 Gets the binding runtime. More...
 
BindingLookupContextgetLookupContext () const
 Accesses target lookup context. More...
 
bool isConnected ()
 Indicates whether this source is connected. More...
 
bool read (Variant &value)
 Reads a value from the binding target. More...
 
void setBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Sets the binding runtime. More...
 
bool write (const Variant &value)
 Writes a value to the binding target. More...
 
virtual ~BindingTargetRuntime ()=default
 Destructor. More...
 

Static Public Member Functions

static BindingTargetRuntimePtr create (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType)
 Creates a typed variable binding target runtime. More...
 
- Static Public Member Functions inherited from kanzi::VariableBindingTargetRuntime
static BindingTargetRuntimePtr create (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType)
 Creates a manual binding target runtime. More...
 

Protected Member Functions

void notifyVariableSources ()
 Notify connected source runtimes. More...
 
 TypedVariableBindingTargetRuntime (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType)
 Constructor. More...
 
bool writeOverride (const Variant &value) override
 BindingTargetRuntime::writeOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::VariableBindingTargetRuntime
void attachForReadOverride () override
 BindingTargetRuntime::attachForReadOverride() implementation. More...
 
void attachForWriteOverride () override
 BindingTargetRuntime::attachForWriteOverride() implementation. More...
 
void detachOverride () override
 BindingTargetRuntime::detachOverride() implementation. More...
 
bool isConnectedOverride () override
 BindingTargetRuntime::isConnectedOverride() implementation. More...
 
bool readOverride (Variant &value) override
 BindingTargetRuntime::readOverride() implementation. More...
 
 VariableBindingTargetRuntime (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::BindingTargetRuntime
 BindingTargetRuntime (BindingLookupContextPtr lookupContext)
 Constructor. More...
 

Protected Attributes

optional< Tm_value
 Storage for the binding result. More...
 
- Protected Attributes inherited from kanzi::VariableBindingTargetRuntime
VariableBindingHostm_host
 Variable binding host connected to. More...
 
AbstractPropertyType m_propertyType
 Property type written. More...
 
vector< AbstractBindingVariableSource * > m_sourceRuntimes
 Variable binding sources connected. More...
 
- Protected Attributes inherited from kanzi::BindingTargetRuntime
AbstractBindingRuntimem_bindingRuntime
 Abstract binding runtime for this target. More...
 
BindingLookupContextPtr m_lookupContext
 Binding lookup context for wherever this binding target runtime is attached to. More...
 
BindingProcessorRuntimeContainer m_processorRuntimes
 Binding processors runtimes (for the target, backward direction). More...
 

Additional Inherited Members

- Public Types inherited from kanzi::VariableBindingTargetRuntime
using VariableSourceContainer = vector< AbstractBindingVariableSource * >
 Container for variable sources. More...
 
- Public Types inherited from kanzi::BindingTargetRuntime
using BindingProcessorRuntimeConstIterator = BindingProcessorRuntimeContainer::const_iterator
 Binding processor iterator type. More...
 
using BindingProcessorRuntimeContainer = vector< BindingProcessorRuntimePtr >
 Binding processor container type. More...
 

Detailed Description

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

Typed runtime for variable binding target.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ TypedVariableBindingTargetRuntime()

template<typename T >
kanzi::TypedVariableBindingTargetRuntime< T >::TypedVariableBindingTargetRuntime ( BindingLookupContextPtr  lookupContext,
AbstractPropertyType  propertyType 
)
inlineprotected

Constructor.

Parameters
lookupContextBinding lookup context to use.
propertyTypeTarget property type.

Member Function Documentation

◆ create()

template<typename T >
static BindingTargetRuntimePtr kanzi::TypedVariableBindingTargetRuntime< T >::create ( BindingLookupContextPtr  lookupContext,
AbstractPropertyType  propertyType 
)
inlinestatic

Creates a typed variable binding target runtime.

Parameters
lookupContextLookup context for this binding target runtime.
propertyTypeTarget property type.
Returns
The created manual binding target runtime.

◆ hasValue()

template<typename T >
bool kanzi::TypedVariableBindingTargetRuntime< T >::hasValue ( ) const
inline

Indicates whether the value has been set.

Returns
True if value has been assigned, false otherwise.

◆ writeToVariant()

template<typename T >
bool kanzi::TypedVariableBindingTargetRuntime< T >::writeToVariant ( Variant value)
inline

Writes the contents of this target runtime to the given variant.

Parameters
valueValue to write to.
Returns
True if there was a value to write.

◆ notifyVariableSources()

template<typename T >
void kanzi::TypedVariableBindingTargetRuntime< T >::notifyVariableSources ( )
inlineprotected

Notify connected source runtimes.

Kanzi calls this function after the variable binding target has been written.

◆ writeOverride()

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

Member Data Documentation

◆ m_value

template<typename T >
optional<T> kanzi::TypedVariableBindingTargetRuntime< T >::m_value
protected

Storage for the binding result.


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