Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::ManualBindingRuntime Class Reference

Runtime for binding. More...

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

Inheritance diagram for kanzi::ManualBindingRuntime:
[legend]

Public Member Functions

Variant getCachedValue () const
 Gets the result of last operation. More...
 
bool read ()
 Performs a read and stores the read value in the binding's internal cache. More...
 
bool write ()
 Performs a write for last read value that was stored in the binding's internal cache. 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...
 
shared_ptr< void > getOwner () const
 Gets the owner. More...
 
BindingSourceRuntimegetSourceRuntime ()
 Gets the source runtime. More...
 
BindingTargetRuntimegetTargetRuntime ()
 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...
 

Static Public Member Functions

static ManualBindingRuntimeSharedPtr create (ManualBindingSharedPtr manualBinding, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Creates a binding runtime. More...
 

Protected Member Functions

void attachOverride () override
 AbstractBindingRuntime::attachOverride() implementation. More...
 
 ManualBindingRuntime (ManualBindingSharedPtr manualBinding, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
void notifySourceChangedOverride () override
 AbstractBindingRuntime::notifySourceChangedOverride() implementation. More...
 
bool updateOverride () override
 AbstractBindingRuntime::updateOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::BindingBaseRuntime
 BindingBaseRuntime (AbstractBindingSharedPtr binding, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
void detachOverride () override
 AbstractBindingRuntime::detachOverride() implementation. More...
 
- Protected Member Functions inherited from kanzi::AbstractBindingRuntime
 AbstractBindingRuntime (AbstractBindingSharedPtr binding, BindingSourceRuntimePtr sourceRuntime, BindingTargetRuntimePtr targetRuntime)
 Constructor. More...
 
virtual bool isConnectedOverride ()
 Binding-dependent attached indication. More...
 
virtual void notifyTargetChangedOverride ()
 Binding-dependent target 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...
 

Protected Attributes

Variant m_value
 Last value acquired in binding read. 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...
 
weak_ptr< void > m_owner
 Owner for tagging the runtime. More...
 
BindingSourceRuntimePtr m_sourceRuntime
 Runtime for source. More...
 
BindingTargetRuntimePtr m_targetRuntime
 Runtime for 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...
 

Detailed Description

Runtime for binding.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

◆ ManualBindingRuntime()

kanzi::ManualBindingRuntime::ManualBindingRuntime ( ManualBindingSharedPtr  manualBinding,
BindingSourceRuntimePtr  sourceRuntime,
BindingTargetRuntimePtr  targetRuntime 
)
protected

Constructor.

Parameters
manualBindingManual binding that created this runtime.
sourceRuntimeBinding source runtime.
targetRuntimeBinding target runtime.

Member Function Documentation

◆ create()

static ManualBindingRuntimeSharedPtr kanzi::ManualBindingRuntime::create ( ManualBindingSharedPtr  manualBinding,
BindingSourceRuntimePtr  sourceRuntime,
BindingTargetRuntimePtr  targetRuntime 
)
static

Creates a binding runtime.

Parameters
manualBindingManual binding that created this runtime.
sourceRuntimeBinding source runtime.
targetRuntimeBinding target runtime.

◆ read()

bool kanzi::ManualBindingRuntime::read ( )

Performs a read and stores the read value in the binding's internal cache.

Returns
True if a read was successfully performed.

◆ write()

bool kanzi::ManualBindingRuntime::write ( )

Performs a write for last read value that was stored in the binding's internal cache.

Returns
True if a write was successfully performed.

◆ getCachedValue()

Variant kanzi::ManualBindingRuntime::getCachedValue ( ) const
inline

Gets the result of last operation.

This function returns the result of last read and validation operation. If the binding does not store last read value, this function returns an empty variant.

Returns
Last value written.

◆ attachOverride()

void kanzi::ManualBindingRuntime::attachOverride ( )
overrideprotectedvirtual

◆ updateOverride()

bool kanzi::ManualBindingRuntime::updateOverride ( )
overrideprotectedvirtual

◆ notifySourceChangedOverride()

void kanzi::ManualBindingRuntime::notifySourceChangedOverride ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_value

Variant kanzi::ManualBindingRuntime::m_value
protected

Last value acquired in binding read.


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