Kanzi  3.9.8
Kanzi Engine C++ API
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 = vector< AbstractExpressionValueSourceRuntimePtr >
 Container for expression value sources. More...
 
- Public Types inherited from kanzi::BindingSourceRuntime
using BindingProcessorRuntimeConstIterator = BindingProcessorRuntimeContainer::const_iterator
 Binding processor runtime constant iterator type. More...
 
using BindingProcessorRuntimeContainer = vector< BindingProcessorRuntimePtr >
 Binding processor runtime container type. More...
 

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Runtime for expression binding source.

Since
Kanzi 3.7.0

Member Typedef Documentation

Constructor & Destructor Documentation

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

Constructor.

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

Member Function Documentation

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.
void kanzi::ExpressionBindingSourceRuntime::sourceConnected ( )

Called by expression value sources when a source connects.

void kanzi::ExpressionBindingSourceRuntime::sourceDisconnected ( )

Called by expression value sources when a source disconnects.

void kanzi::ExpressionBindingSourceRuntime::sourceValueChanged ( )

Called by expression value sources when a source value changes.

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

Resolves a register based on argument type.

Parameters
argumentTypeRegister identifier.
Returns
Reference to the register.
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.
AbstractExpressionValueSourceRuntime* kanzi::ExpressionBindingSourceRuntime::getExpressionValueSourceRuntime ( size_t  idx)
inline

Gets expression value source runtime by index.

Parameters
idxIndex.
Returns
Pointer to expression value source runtime.
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.
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.
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.
Variant* kanzi::ExpressionBindingSourceRuntime::getTemporaryRegister ( size_t  idx)
inline

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to the temporary register.
const Variant* kanzi::ExpressionBindingSourceRuntime::getTemporaryRegister ( size_t  idx) const
inline

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to the temporary register.
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.
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.
void kanzi::ExpressionBindingSourceRuntime::attachForReadOverride ( )
overrideprotectedvirtual
void kanzi::ExpressionBindingSourceRuntime::attachForWriteOverride ( )
overrideprotectedvirtual
void kanzi::ExpressionBindingSourceRuntime::detachOverride ( )
overrideprotectedvirtual
bool kanzi::ExpressionBindingSourceRuntime::readOverride ( Variant value)
overrideprotectedvirtual
bool kanzi::ExpressionBindingSourceRuntime::isConnectedOverride ( )
overrideprotectedvirtual
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.
bool kanzi::ExpressionBindingSourceRuntime::executeOpCodeDefault ( const BindingExpressionOpCode opCode)
protected

Perform typical operation.

Parameters
opCodeOperation code.
Returns
True if the operation executed without errors, otherwise false.
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
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

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.

size_t kanzi::ExpressionBindingSourceRuntime::m_connectedSourceCount
protected

Number of connected sources.

bool kanzi::ExpressionBindingSourceRuntime::m_sourceValueChangeListenerRequested
protected

Indicates whether source value changes trigger the binding.

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

Binding sources copied from expression binding source.

Variant kanzi::ExpressionBindingSourceRuntime::m_currentValueVariant
protected

Generated variant.

Cleared at the end of execution.

ExpressionBindingSource& kanzi::ExpressionBindingSourceRuntime::m_source
protected

Host expression binding source.


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