Runtime for expression binding source. More...
#include <kanzi/core.ui/binding/expression_binding_source_runtime.hpp>
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... | |
AbstractExpressionValueSourceRuntime * | getDataSourceValueSourceRuntime (size_t idx) |
Gets data source value source runtime by index. More... | |
const AbstractExpressionValueSourceRuntime * | getDataSourceValueSourceRuntime (size_t idx) const |
Gets data source value source runtime by index. More... | |
AbstractExpressionValueSourceRuntime * | getExpressionValueSourceRuntime (size_t idx) |
Gets expression value source runtime by index. More... | |
const AbstractExpressionValueSourceRuntime * | getExpressionValueSourceRuntime (size_t idx) const |
Gets expression value source runtime by index. More... | |
Variant * | getTemporaryRegister (size_t idx) |
Accesses temporary register. More... | |
const Variant * | getTemporaryRegister (size_t idx) const |
Accesses temporary register. More... | |
Variant * | resolveRegister (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... | |
AbstractBindingRuntime * | getBindingRuntime () const |
Gets the binding runtime. More... | |
BindingLookupContext & | getLookupContext () 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 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... | |
ExpressionBindingSource & | m_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 | |
AbstractBindingRuntime * | m_bindingRuntime |
Abstract binding runtime for this source. More... | |
BindingProcessorRuntimeContainer | m_processorRuntimes |
Binding processors (for the source, forward direction). More... | |
Runtime for expression binding source.
using kanzi::ExpressionBindingSourceRuntime::ExpressionValueSourceRuntimeContainer = vector<AbstractExpressionValueSourceRuntimePtr> |
Container for expression value sources.
|
explicitprotected |
Constructor.
bindingSource | Host expression binding source. |
|
static |
Creates an expression binding source runtime.
bindingSource | Parent binding source. |
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.
argumentType | Register identifier. |
|
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.
value | Value that should be set to the register. |
|
inline |
Gets expression value source runtime by index.
idx | Index. |
|
inline |
Gets expression value source runtime by index.
idx | Index. |
|
inline |
Gets data source value source runtime by index.
idx | Index. |
|
inline |
Gets data source value source runtime by index.
idx | Index. |
|
inline |
Accesses temporary register.
idx | Index. |
|
inline |
Accesses temporary register.
idx | Index. |
|
inline |
Gets an iterator to the beginning of operation binding processors vector.
|
inline |
Gets an iterator to the end of operation binding processors vector.
|
overrideprotectedvirtual |
BindingSourceRuntime::attachForReadOverride() implementation.
Implements kanzi::BindingSourceRuntime.
|
overrideprotectedvirtual |
BindingSourceRuntime::attachForWriteOverride() implementation.
Implements kanzi::BindingSourceRuntime.
|
overrideprotectedvirtual |
BindingSourceRuntime::detachOverride() implementation.
Implements kanzi::BindingSourceRuntime.
|
overrideprotectedvirtual |
BindingSourceRuntime::readOverride() implementation.
Implements kanzi::BindingSourceRuntime.
|
overrideprotectedvirtual |
BindingSourceRuntime::isConnectedOverride() implementation.
Implements kanzi::BindingSourceRuntime.
|
protected |
Performs a binding processor operation.
opCode | Operation code. |
|
protected |
Perform typical operation.
opCode | Operation code. |
|
protected |
Performs the continueIf(condition) operation.
opCode | Operation code. |
out_continue | Is set to true when the condition that you pass to the instruction evaluates to true. |
|
protected |
Perform getCurrentValue() operation.
opCode | Operation code. |
|
protected |
Sources for data sources and other value sources.
Value sources are index 0, data sources are index 1.
|
protected |
Number of connected sources.
|
protected |
Indicates whether source value changes trigger the binding.
|
protected |
Binding sources copied from expression binding source.
|
protected |
Generated variant.
Cleared at the end of execution.
|
protected |
Host expression binding source.