Kanzi 3.9.10
kanzi::ExpressionBindingSourceRuntime Class Reference

Runtime for expression binding source. More...

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

Inheritance diagram for kanzi::ExpressionBindingSourceRuntime:
[legend]

Public Types

using ExpressionValueSourceRuntimeContainer
 Container for expression value sources.
 
- Public Types inherited from kanzi::BindingSourceRuntime
using BindingProcessorRuntimeConstIterator
 Binding processor runtime constant iterator type.
 
using BindingProcessorRuntimeContainer
 Binding processor runtime container type.
 

Public Member Functions

const BindingProcessorRuntimeConstIterator beginOperationProcessors ()
 Gets an iterator to the beginning of operation binding processors vector.
 
const BindingProcessorRuntimeConstIterator endOperationProcessors ()
 Gets an iterator to the end of operation binding processors vector.
 
AbstractExpressionValueSourceRuntimegetDataSourceValueSourceRuntime (size_t idx)
 Gets data source value source runtime by index.
 
const AbstractExpressionValueSourceRuntimegetDataSourceValueSourceRuntime (size_t idx) const
 Gets data source value source runtime by index.
 
AbstractExpressionValueSourceRuntimegetExpressionValueSourceRuntime (size_t idx)
 Gets expression value source runtime by index.
 
const AbstractExpressionValueSourceRuntimegetExpressionValueSourceRuntime (size_t idx) const
 Gets expression value source runtime by index.
 
VariantgetTemporaryRegister (size_t idx)
 Accesses temporary register.
 
const VariantgetTemporaryRegister (size_t idx) const
 Accesses temporary register.
 
VariantresolveRegister (BindingExpressionArgumentType argumentType)
 Resolves a register based on argument type.
 
template<typename T >
void setCurrentValue (T &value)
 Templated function for setting the current value.
 
void sourceConnected ()
 Called by expression value sources when a source connects.
 
void sourceDisconnected ()
 Called by expression value sources when a source disconnects.
 
void sourceValueChanged ()
 Called by expression value sources when a source value changes.
 
- Public Member Functions inherited from kanzi::BindingSourceRuntime
void attachForRead ()
 Attaches the binding source runtime for reading.
 
void attachForWrite ()
 Attaches the binding source runtime for writing.
 
BindingProcessorRuntimeConstIterator beginProcessorRuntimes () const
 Gets an iterator to the beginning of binding processors.
 
void createBindingProcessorRuntimes (const AbstractBinding &binding)
 Creates a processor runtime for each BindingProcessor held by the binding parameter.
 
void detach ()
 Detaches the binding source runtime.
 
BindingProcessorRuntimeConstIterator endProcessorRuntimes () const
 Gets an iterator to the end of binding processors.
 
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 binding source.
 
void setBindingRuntime (AbstractBindingRuntime &bindingRuntime)
 Sets the binding runtime.
 
bool write (const Variant &value)
 Writes a value to binding source.
 
virtual ~BindingSourceRuntime ()=default
 Destructor.
 

Static Public Member Functions

static BindingSourceRuntimePtr create (ExpressionBindingSource &bindingSource)
 Creates an expression binding source runtime.
 

Protected Member Functions

void attachForReadOverride () override
 BindingSourceRuntime::attachForReadOverride() implementation.
 
void attachForWriteOverride () override
 BindingSourceRuntime::attachForWriteOverride() implementation.
 
void detachOverride () override
 BindingSourceRuntime::detachOverride() implementation.
 
bool evaluateOpCodeContinueIf (const BindingExpressionOpCode &opCode, bool &out_continue)
 Performs the continueIf(condition) operation.
 
bool executeOpCodeDefault (const BindingExpressionOpCode &opCode)
 Perform typical operation.
 
bool executeOpCodeGetCurrentValue (const BindingExpressionOpCode &opCode)
 Perform getCurrentValue() operation.
 
bool executeProcessorOperation (const BindingExpressionOpCode &opCode)
 Performs a binding processor operation.
 
 ExpressionBindingSourceRuntime (ExpressionBindingSource &bindingSource)
 Constructor.
 
bool isConnectedOverride () override
 BindingSourceRuntime::isConnectedOverride() implementation.
 
bool readOverride (Variant &value) override
 BindingSourceRuntime::readOverride() implementation.
 
- Protected Member Functions inherited from kanzi::BindingSourceRuntime
 BindingSourceRuntime ()=default
 Constructor.
 
virtual bool writeOverride (const Variant &value)
 Implementation-dependent write.
 

Protected Attributes

size_t m_connectedSourceCount
 Number of connected sources.
 
Variant m_currentValueVariant
 Generated variant.
 
BindingSourceRuntime::BindingProcessorRuntimeContainer m_operationProcessorRuntimes
 Binding sources copied from expression binding source.
 
ExpressionBindingSourcem_source
 Host expression binding source.
 
ExpressionValueSourceRuntimeContainer m_sources [2]
 Sources for data sources and other value sources.
 
bool m_sourceValueChangeListenerRequested
 Indicates whether source value changes trigger the binding.
 
- Protected Attributes inherited from kanzi::BindingSourceRuntime
AbstractBindingRuntimem_bindingRuntime
 Abstract binding runtime for this source.
 
BindingProcessorRuntimeContainer m_processorRuntimes
 Binding processors (for the source, forward direction).
 

Detailed Description

Runtime for expression binding source.

Since
Kanzi 3.7.0

Member Typedef Documentation

◆ ExpressionValueSourceRuntimeContainer

Constructor & Destructor Documentation

◆ ExpressionBindingSourceRuntime()

kanzi::ExpressionBindingSourceRuntime::ExpressionBindingSourceRuntime ( ExpressionBindingSource & bindingSource)
explicitprotected

Constructor.

Parameters
bindingSourceHost expression binding source.
Since
Kanzi 3.9.6 Removed BindingLookupContextPtr.

Member Function Documentation

◆ create()

static BindingSourceRuntimePtr kanzi::ExpressionBindingSourceRuntime::create ( ExpressionBindingSource & bindingSource)
static

Creates an expression binding source runtime.

Parameters
bindingSourceParent binding source.
Returns
The created expression binding source runtime.
Since
Kanzi 3.9.6 Removed BindingLookupContextPtr.

◆ sourceConnected()

void kanzi::ExpressionBindingSourceRuntime::sourceConnected ( )

Called by expression value sources when a source connects.

◆ sourceDisconnected()

void kanzi::ExpressionBindingSourceRuntime::sourceDisconnected ( )

Called by expression value sources when a source disconnects.

◆ sourceValueChanged()

void kanzi::ExpressionBindingSourceRuntime::sourceValueChanged ( )

Called by expression value sources when a source value changes.

◆ resolveRegister()

Variant * kanzi::ExpressionBindingSourceRuntime::resolveRegister ( BindingExpressionArgumentType argumentType)

Resolves a register based on argument type.

Parameters
argumentTypeRegister identifier.
Returns
Reference to the register.

◆ setCurrentValue()

template<typename T >
void kanzi::ExpressionBindingSourceRuntime::setCurrentValue ( T & value)
inline

Templated function for setting the current value.

Stores the pointer and conversion function to generate the variant for given type. If current value is not used, the variant is never created.

Parameters
valueValue that should be set to the register.

◆ getExpressionValueSourceRuntime() [1/2]

AbstractExpressionValueSourceRuntime * kanzi::ExpressionBindingSourceRuntime::getExpressionValueSourceRuntime ( size_t idx)
inline

Gets expression value source runtime by index.

Parameters
idxIndex.
Returns
Pointer to expression value source runtime.

◆ getExpressionValueSourceRuntime() [2/2]

const AbstractExpressionValueSourceRuntime * kanzi::ExpressionBindingSourceRuntime::getExpressionValueSourceRuntime ( size_t idx) const
inline

Gets expression value source runtime by index.

Parameters
idxIndex.
Returns
Pointer to expression value source runtime.

◆ getDataSourceValueSourceRuntime() [1/2]

AbstractExpressionValueSourceRuntime * kanzi::ExpressionBindingSourceRuntime::getDataSourceValueSourceRuntime ( size_t idx)
inline

Gets data source value source runtime by index.

Parameters
idxIndex.
Returns
Pointer to data source value source runtime.

◆ getDataSourceValueSourceRuntime() [2/2]

const AbstractExpressionValueSourceRuntime * kanzi::ExpressionBindingSourceRuntime::getDataSourceValueSourceRuntime ( size_t idx) const
inline

Gets data source value source runtime by index.

Parameters
idxIndex.
Returns
Pointer to data source value source runtime.

◆ getTemporaryRegister() [1/2]

Variant * kanzi::ExpressionBindingSourceRuntime::getTemporaryRegister ( size_t idx)
inline

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to the temporary register.

◆ getTemporaryRegister() [2/2]

const Variant * kanzi::ExpressionBindingSourceRuntime::getTemporaryRegister ( size_t idx) const
inline

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to the temporary register.

◆ beginOperationProcessors()

const BindingProcessorRuntimeConstIterator kanzi::ExpressionBindingSourceRuntime::beginOperationProcessors ( )
inline

Gets an iterator to the beginning of operation binding processors vector.

Returns
iterator to the beginning of operation binding processors vector.

◆ endOperationProcessors()

const BindingProcessorRuntimeConstIterator kanzi::ExpressionBindingSourceRuntime::endOperationProcessors ( )
inline

Gets an iterator to the end of operation binding processors vector.

Returns
iterator to the end of operation binding processors vector.

◆ attachForReadOverride()

void kanzi::ExpressionBindingSourceRuntime::attachForReadOverride ( )
overrideprotectedvirtual

◆ attachForWriteOverride()

void kanzi::ExpressionBindingSourceRuntime::attachForWriteOverride ( )
overrideprotectedvirtual

◆ detachOverride()

void kanzi::ExpressionBindingSourceRuntime::detachOverride ( )
overrideprotectedvirtual

◆ readOverride()

bool kanzi::ExpressionBindingSourceRuntime::readOverride ( Variant & value)
overrideprotectedvirtual

◆ isConnectedOverride()

bool kanzi::ExpressionBindingSourceRuntime::isConnectedOverride ( )
overrideprotectedvirtual

◆ executeProcessorOperation()

bool kanzi::ExpressionBindingSourceRuntime::executeProcessorOperation ( const BindingExpressionOpCode & opCode)
protected

Performs a binding processor operation.

Parameters
opCodeOperation code.
Returns
If the operation executes without errors, true, otherwise false.

◆ executeOpCodeDefault()

bool kanzi::ExpressionBindingSourceRuntime::executeOpCodeDefault ( const BindingExpressionOpCode & opCode)
protected

Perform typical operation.

Parameters
opCodeOperation code.
Returns
True if the operation executed without errors, otherwise false.

◆ evaluateOpCodeContinueIf()

bool kanzi::ExpressionBindingSourceRuntime::evaluateOpCodeContinueIf ( const BindingExpressionOpCode & opCode,
bool & out_continue )
protected

Performs the continueIf(condition) operation.

Parameters
opCodeOperation code.
out_continueIs set to true when the condition that you pass to the instruction evaluates to true.
Returns
If the operation executes without errors, true, otherwise false.
Since
Kanzi 3.9.5

◆ executeOpCodeGetCurrentValue()

bool kanzi::ExpressionBindingSourceRuntime::executeOpCodeGetCurrentValue ( const BindingExpressionOpCode & opCode)
protected

Perform getCurrentValue() operation.

Parameters
opCodeOperation code.
Returns
True if the operation executed without errors, otherwise false.

Member Data Documentation

◆ m_sources

ExpressionValueSourceRuntimeContainer kanzi::ExpressionBindingSourceRuntime::m_sources[2]
protected

Sources for data sources and other value sources.

Value sources are index 0, data sources are index 1.

◆ m_connectedSourceCount

size_t kanzi::ExpressionBindingSourceRuntime::m_connectedSourceCount
protected

Number of connected sources.

◆ m_sourceValueChangeListenerRequested

bool kanzi::ExpressionBindingSourceRuntime::m_sourceValueChangeListenerRequested
protected

Indicates whether source value changes trigger the binding.

◆ m_operationProcessorRuntimes

BindingSourceRuntime::BindingProcessorRuntimeContainer kanzi::ExpressionBindingSourceRuntime::m_operationProcessorRuntimes
protected

Binding sources copied from expression binding source.

◆ m_currentValueVariant

Variant kanzi::ExpressionBindingSourceRuntime::m_currentValueVariant
protected

Generated variant.

Cleared at the end of execution.

◆ m_source

ExpressionBindingSource& kanzi::ExpressionBindingSourceRuntime::m_source
protected

Host expression binding source.


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