Kanzi  3.9.8
Kanzi Engine C++ API
kanzi::TwoWayBindingRuntime Class Reference

Runtime for two-way binding. More...

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

Inheritance diagram for kanzi::TwoWayBindingRuntime:
[legend]

Static Public Member Functions

static TwoWayBindingRuntimeSharedPtr create (TwoWayBindingSharedPtr twoWayBinding, BindingLookupContextPtr lookupContext, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Creates a two-way binding runtime. More...
 

Protected Member Functions

void attachOverride () override
 AbstractBindingRuntime::attachOverride() implementation. More...
 
void detachOverride () override
 AbstractBindingRuntime::detachOverride() implementation. More...
 
void notifyTargetChangedOverride () override
 AbstractBindingRuntime::notifyTargetChangedOverride() implementation. More...
 
 TwoWayBindingRuntime (TwoWayBindingSharedPtr twoWayBinding, BindingLookupContextPtr lookupContext, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::BindingBaseRuntime
 BindingBaseRuntime (AbstractBindingSharedPtr binding, BindingLookupContextPtr lookupContext, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
bool updateOverride () override
 AbstractBindingRuntime::updateOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::AbstractBindingRuntime
 AbstractBindingRuntime (AbstractBindingSharedPtr binding, BindingLookupContextPtr lookupContext, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
virtual bool isConnectedOverride ()
 Binding-dependent attached indication. More...
 
virtual void notifySourceChangedOverride ()
 Binding-dependent source change. More...
 
bool readFromSource (Variant &value)
 Read from source and execute forward validators. More...
 
bool readFromTarget (Variant &value)
 Reads from target and executes reverse validators. More...
 
bool writeToSource (const Variant &value) const
 Writes to source. More...
 
bool writeToTarget (const Variant &value)
 Write to target. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::AbstractBindingRuntime
enum  AttachmentState {
  Detached, Detaching, Attaching, Attached,
  Removed
}
 Attachment state for keeping track current status. More...
 
- Public Member Functions inherited from kanzi::AbstractBindingRuntime
void attach ()
 Attach the binding. More...
 
void detach ()
 Detaches the binding. More...
 
void detachIfAttachedOrAttaching ()
 Detaches the binding if it is attaching or attached. More...
 
AbstractBindingSharedPtr getBinding () const
 Returns the binding associated with this binding runtime. More...
 
BindingLookupContextgetLookupContext () const
 Gets the lookup context. More...
 
shared_ptr< voidgetOwner () const
 Gets the owner. More...
 
BindingSourceRuntimegetSourceRuntime () const
 Gets the source runtime. More...
 
BindingTargetRuntimegetTargetRuntime () const
 Gets the target runtime. More...
 
bool isAttached () const
 Indicates whether this binding runtime has been attached. More...
 
bool isAttaching () const
 Indicates whether this binding runtime is being attached. More...
 
bool isConnected ()
 Indicates whether this binding runtime is connected. More...
 
bool isDetached () const
 Indicates whether this binding runtime is detached. More...
 
bool isDetaching () const
 Indicates whether this binding runtime is being detached. More...
 
bool isRemoved () const
 Gets whether the binding runtime has been removed from the binding host. More...
 
void notifySourceChanged ()
 Called when binding source has changed. More...
 
void notifyTargetChanged ()
 Called when binding target has changed. More...
 
void onRemoved ()
 Called when binding is being removed from where it has been installed. More...
 
void removeFromHost ()
 Removes the binding runtime from the binding host. More...
 
void setHost (BindingHostConceptSharedPtr hostObject)
 Sets the binding host object in which the binding runtime is hosted. More...
 
void setOwner (shared_ptr< void > owner)
 Set the owner. More...
 
bool update ()
 Execute the binding. More...
 
virtual ~AbstractBindingRuntime ()
 Destructor. More...
 
- Protected Attributes inherited from kanzi::BindingBaseRuntime
bool m_updateInProgress
 Flag for update being in progress. More...
 
- Protected Attributes inherited from kanzi::AbstractBindingRuntime
AttachmentState m_attachmentState
 Current binding runtime state. More...
 
AbstractBindingSharedPtr m_binding
 Associated binding. More...
 
BindingHostConceptWeakPtr m_bindingHost
 The binding host object in which the binding runtime is hosted. More...
 
BindingLookupContextPtr m_lookupContext
 
weak_ptr< voidm_owner
 Owner for tagging the runtime. More...
 
BindingSourceRuntimePtr m_sourceRuntime
 Runtime for source. More...
 
BindingTargetRuntimePtr m_targetRuntime
 Runtime for target. More...
 

Detailed Description

Runtime for two-way binding.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

kanzi::TwoWayBindingRuntime::TwoWayBindingRuntime ( TwoWayBindingSharedPtr  twoWayBinding,
BindingLookupContextPtr  lookupContext,
BindingSourceRuntimePtr  sourceRuntime,
BindingTargetRuntimePtr  targetRuntime 
)
explicitprotected

Constructor.

Parameters
twoWayBindingBidirectional binding that created this runtime.
lookupContextBinding lookup context.
sourceRuntimeRuntime created for binding source.
targetRuntimeRuntime created for binding target.
Since
Kanzi 3.9.6 Added BindingLookupContextPtr.

Member Function Documentation

static TwoWayBindingRuntimeSharedPtr kanzi::TwoWayBindingRuntime::create ( TwoWayBindingSharedPtr  twoWayBinding,
BindingLookupContextPtr  lookupContext,
BindingSourceRuntimePtr  sourceRuntime,
BindingTargetRuntimePtr  targetRuntime 
)
static

Creates a two-way binding runtime.

Parameters
twoWayBindingHost binding.
lookupContextBinding lookup context.
sourceRuntimeBinding source runtime.
targetRuntimeBinding target runtime.
Returns
The created runtime for a two-way binding.
Since
Kanzi 3.9.6 Added BindingLookupContextPtr.
void kanzi::TwoWayBindingRuntime::attachOverride ( )
overrideprotectedvirtual
void kanzi::TwoWayBindingRuntime::detachOverride ( )
overrideprotectedvirtual
void kanzi::TwoWayBindingRuntime::notifyTargetChangedOverride ( )
overrideprotectedvirtual

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