Variable binding target runtime. More...
#include <kanzi/core.ui/binding/variable_binding_target_runtime.hpp>
Public Types | |
using | VariableSourceContainer = vector< AbstractBindingVariableSource * > |
Container for variable sources. More... | |
Public Types inherited from kanzi::BindingTargetRuntime | |
typedef BindingProcessorContainer::const_iterator | BindingProcessorConstIterator |
Binding processor iterator type. More... | |
typedef vector< BindingProcessorSharedPtr > | BindingProcessorContainer |
Binding processor container type. More... | |
Public Member Functions | |
void | addVariableSource (AbstractBindingVariableSource &sourceRuntime) |
Adds a variable binding source runtime. More... | |
AbstractPropertyType | getPropertyType () const |
Gets property type. More... | |
AbstractBindingVariableSource * | removeLastVariableSource () |
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... | |
BindingProcessorConstIterator | beginProcessors () const |
Gets an iterator to the beginning of binding processors. More... | |
void | copyBindingProcessors (const AbstractBinding &binding) |
Copies backward direction processors from a binding. More... | |
void | detach () |
Detaches binding target runtime. More... | |
BindingProcessorConstIterator | endProcessors () const |
Gets an iterator to the end of binding processors. More... | |
AbstractBindingRuntime * | getBindingRuntime () const |
Gets the binding runtime. More... | |
BindingLookupContext & | getLookupContext () 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 () |
Destructor. More... | |
Static Public Member Functions | |
static BindingTargetRuntimePtr | create (BindingLookupContextPtr lookupContext, AbstractPropertyType propertyType) |
Creates a manual binding target runtime. More... | |
Protected Member Functions | |
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... | |
virtual bool | writeOverride (const Variant &value)=0 |
Implementation-dependent write. More... | |
Protected Attributes | |
VariableBindingHost * | m_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 | |
AbstractBindingRuntime * | m_bindingRuntime |
Abstract binding runtime for this target. More... | |
BindingLookupContextPtr | m_lookupContext |
Binding lookup context for wherever this binding target runtime is attached to. More... | |
BindingProcessorContainer | m_processors |
Binding processors (for the target, backward direction). More... | |
Variable binding target runtime.
VariableBindingTargetRuntime holds the result of a binding operation as a readable variable.
VariableBindingTargetRuntime is intended to be used with a specific lookup in a binding host that is not a PropertyObject. This enables storing binding results without the overhead of PropertyObject interface.
There is no base value to modify, so VariableBindingTarget cannot write into a property field.
using kanzi::VariableBindingTargetRuntime::VariableSourceContainer = vector<AbstractBindingVariableSource*> |
Container for variable sources.
|
virtual |
Destructor.
|
protected |
Constructor.
lookupContext | Binding lookup context to use. |
propertyType | Target property type. |
|
static |
Creates a manual binding target runtime.
lookupContext | Lookup context for this binding target runtime. |
propertyType | Target property type. |
|
inline |
Gets property type.
Required by inheriting classes.
void kanzi::VariableBindingTargetRuntime::addVariableSource | ( | AbstractBindingVariableSource & | sourceRuntime | ) |
Adds a variable binding source runtime.
Variable binding source runtimes are notified when the binding target is written.
sourceRuntime | Source runtime to add. |
void kanzi::VariableBindingTargetRuntime::removeSourceRuntime | ( | AbstractBindingVariableSource & | sourceRuntime | ) |
Removes a variable binding source runtime.
sourceRuntime | Source runtime to remove. |
AbstractBindingVariableSource* kanzi::VariableBindingTargetRuntime::removeLastVariableSource | ( | ) |
Removes the last variable source listening on this target.
|
overrideprotectedvirtual |
BindingTargetRuntime::attachForReadOverride() implementation.
Reimplemented from kanzi::BindingTargetRuntime.
|
overrideprotectedvirtual |
BindingTargetRuntime::attachForWriteOverride() implementation.
Implements kanzi::BindingTargetRuntime.
|
overrideprotectedvirtual |
BindingTargetRuntime::detachOverride() implementation.
Implements kanzi::BindingTargetRuntime.
|
overrideprotectedvirtual |
BindingTargetRuntime::readOverride() implementation.
Reimplemented from kanzi::BindingTargetRuntime.
|
overrideprotectedvirtual |
BindingTargetRuntime::isConnectedOverride() implementation.
Implements kanzi::BindingTargetRuntime.
|
protected |
Property type written.
|
protected |
Variable binding host connected to.
|
protected |
Variable binding sources connected.