Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::ExpressionBindingSource Class Reference

Expression binding source collects expression value sources and executes operations on the values to produce a read result. More...

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

Inheritance diagram for kanzi::ExpressionBindingSource:
[legend]

Public Types

typedef vector< BindingExpressionOpCodeBindingOperationContainer
 Container for binding expressions. More...
 
typedef vector< AbstractExpressionValueSourceSharedPtrValueSourceContainer
 Container for expression value source create info. More...
 

Public Member Functions

BindingOperationContainer::iterator beginBindingOperations ()
 Gets an iterator to the beginning of binding operations. More...
 
BindingOperationContainer::const_iterator beginBindingOperations () const
 Gets an iterator to the beginning of binding operations. More...
 
ValueSourceContainer::const_iterator beginDataSources () const
 Gets an iterator to the beginning of create infos for data source expression value sources. More...
 
AbstractBinding::BindingProcessorContainer::iterator beginOperationProcessors ()
 Gets an iterator to the beginning of binding operation processors. More...
 
AbstractBinding::BindingProcessorContainer::const_iterator beginOperationProcessors () const
 Gets an iterator to the beginning of binding operation processors. More...
 
ValueSourceContainer::const_iterator beginValueSources () const
 Gets an iterator to the beginning of create infos for expression value sources. More...
 
BindingOperationContainer::iterator endBindingOperations ()
 Gets an iterator to the end of binding operations. More...
 
BindingOperationContainer::const_iterator endBindingOperations () const
 Gets an iterator to the end of binding operations. More...
 
ValueSourceContainer::const_iterator endDataSources () const
 Gets an iterator to the end of create infos for data source expression value sources. More...
 
AbstractBinding::BindingProcessorContainer::iterator endOperationProcessors ()
 Gets an iterator to the end of binding operation processors. More...
 
AbstractBinding::BindingProcessorContainer::const_iterator endOperationProcessors () const
 Gets an iterator to the end of binding operation processors. More...
 
ValueSourceContainer::const_iterator endValueSources () const
 Gets an iterator to the end of create infos for expression value sources. More...
 
VariantgetTemporaryRegister (size_t idx)
 Accesses temporary register. More...
 
const VariantgetTemporaryRegister (size_t idx) const
 Accesses temporary register. More...
 
bool hasFixedOperations () const
 Tells if the source contains fixed operations. More...
 
bool isCurrentValueRequired () const
 Tells if current value is required. More...
 
VariantresolveRegister (BindingExpressionArgumentType argumentType)
 Resolve register by index. More...
 
- Public Member Functions inherited from kanzi::BindingSource
BindingSourceRuntimePtr createRuntime ()
 Creates binding source runtime. More...
 
virtual ~BindingSource ()
 Destructor. More...
 

Static Public Member Functions

static BindingSourcePtr create (const BindingOperationContainer operations, const AbstractBinding::BindingProcessorContainer operationProcessors, const ValueSourceContainer &valueSources, const ValueSourceContainer &dataSources, const vector< Variant > &constantRegisters, size_t temporaryCount)
 Creates an expression binding source. More...
 
static BindingSourcePtr create (const BindingOperationContainer operations, const ValueSourceContainer &valueSources, const ValueSourceContainer &dataSources, const vector< Variant > &constantRegisters, size_t temporaryCount)
 Creates an expression binding source. More...
 
static BindingSourcePtr create (const BindingOperationContainer operations, const ValueSourceContainer &valueSources, const vector< Variant > &constantRegisters, size_t temporaryCount)
 Creates an expression binding source. More...
 
static BindingSourcePtr create (string_view path, AbstractPropertyType propertyType, PropertyField field)
 Creates an object property binding source. More...
 

Protected Member Functions

BindingSourceRuntimePtr createRuntimeOverride () override
 BindingSource::createRuntime implementation. More...
 
 ExpressionBindingSource (const BindingOperationContainer operations, const AbstractBinding::BindingProcessorContainer operationProcessors, const ValueSourceContainer &valueSources, const ValueSourceContainer &dataSources, const vector< Variant > &constantRegisters, size_t temporaryCount)
 Constructor. More...
 
- Protected Member Functions inherited from kanzi::BindingSource
 BindingSource ()
 Constructor. More...
 

Protected Attributes

ValueSourceContainer m_dataSources
 Data source expression value sources. More...
 
bool m_hasFixedOperations
 Tells whether or not the binding contains fixed operations. More...
 
bool m_isCurrentValueRequired
 Tells if current value is required. More...
 
AbstractBinding::BindingProcessorContainer m_operationProcessors
 Binding operation processors that you can refer to from individual binding ops. More...
 
BindingOperationContainer m_operations
 Binding operations. More...
 
vector< Variantm_registers [2]
 Registers for the expression binding source. More...
 
ValueSourceContainer m_valueSources
 Expression value sources. More...
 

Detailed Description

Expression binding source collects expression value sources and executes operations on the values to produce a read result.

Since
Kanzi 3.7.0

Member Typedef Documentation

Container for expression value source create info.

Container for binding expressions.

Constructor & Destructor Documentation

kanzi::ExpressionBindingSource::ExpressionBindingSource ( const BindingOperationContainer  operations,
const AbstractBinding::BindingProcessorContainer  operationProcessors,
const ValueSourceContainer valueSources,
const ValueSourceContainer dataSources,
const vector< Variant > &  constantRegisters,
size_t  temporaryCount 
)
protected

Constructor.

Parameters
operationsBinding operations.
operationProcessorsBinding processors for the binding operations.
valueSourcesBinding expression value sources for the expression binding source.
dataSourcesBinding expression data sources for the expression binding source.
constantRegistersConstant registers.
temporaryCountNumber of temporary registers.

Member Function Documentation

static BindingSourcePtr kanzi::ExpressionBindingSource::create ( const BindingOperationContainer  operations,
const AbstractBinding::BindingProcessorContainer  operationProcessors,
const ValueSourceContainer valueSources,
const ValueSourceContainer dataSources,
const vector< Variant > &  constantRegisters,
size_t  temporaryCount 
)
static

Creates an expression binding source.

Parameters
operationsBinding operations.
operationProcessorsBinding processors for the binding operations.
valueSourcesBinding expression value sources for the expression binding source.
dataSourcesBinding expression data sources for the expression binding source.
constantRegistersConstant registers.
temporaryCountNumber of temporary registers.
Returns
The created expression binding source.
static BindingSourcePtr kanzi::ExpressionBindingSource::create ( const BindingOperationContainer  operations,
const ValueSourceContainer valueSources,
const ValueSourceContainer dataSources,
const vector< Variant > &  constantRegisters,
size_t  temporaryCount 
)
inlinestatic

Creates an expression binding source.

No operation binding processors are specified.

Parameters
operationsBinding operations.
valueSourcesBinding expression value sources for the expression binding source.
dataSourcesBinding expression data sources for the expression binding source.
constantRegistersConstant registers.
temporaryCountNumber of temporary registers.
Returns
The created expression binding source.
static BindingSourcePtr kanzi::ExpressionBindingSource::create ( const BindingOperationContainer  operations,
const ValueSourceContainer valueSources,
const vector< Variant > &  constantRegisters,
size_t  temporaryCount 
)
inlinestatic

Creates an expression binding source.

No operation binding processors or data sources are specified.

Parameters
operationsBinding operations.
valueSourcesBinding expression value sources for the expression binding source.
constantRegistersConstant registers.
temporaryCountNumber of temporary registers.
Returns
The created expression binding source.
static BindingSourcePtr kanzi::ExpressionBindingSource::create ( string_view  path,
AbstractPropertyType  propertyType,
PropertyField  field 
)
static

Creates an object property binding source.

Creates one WRITE directive.

Parameters
pathPath to object.
propertyTypeProperty type to listen to.
fieldProperty field to read.
Returns
The created object property binding source.
ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::beginValueSources ( ) const
inline

Gets an iterator to the beginning of create infos for expression value sources.

Returns
Const iterator.
ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::endValueSources ( ) const
inline

Gets an iterator to the end of create infos for expression value sources.

Returns
Const iterator.
ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::beginDataSources ( ) const
inline

Gets an iterator to the beginning of create infos for data source expression value sources.

Returns
Const iterator.
ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::endDataSources ( ) const
inline

Gets an iterator to the end of create infos for data source expression value sources.

Returns
Const iterator.
BindingOperationContainer::iterator kanzi::ExpressionBindingSource::beginBindingOperations ( )
inline

Gets an iterator to the beginning of binding operations.

Returns
Iterator.
BindingOperationContainer::const_iterator kanzi::ExpressionBindingSource::beginBindingOperations ( ) const
inline

Gets an iterator to the beginning of binding operations.

Returns
Iterator.
BindingOperationContainer::iterator kanzi::ExpressionBindingSource::endBindingOperations ( )
inline

Gets an iterator to the end of binding operations.

Returns
Iterator.
BindingOperationContainer::const_iterator kanzi::ExpressionBindingSource::endBindingOperations ( ) const
inline

Gets an iterator to the end of binding operations.

Returns
Const iterator.
AbstractBinding::BindingProcessorContainer::iterator kanzi::ExpressionBindingSource::beginOperationProcessors ( )
inline

Gets an iterator to the beginning of binding operation processors.

Returns
Iterator.
AbstractBinding::BindingProcessorContainer::const_iterator kanzi::ExpressionBindingSource::beginOperationProcessors ( ) const
inline

Gets an iterator to the beginning of binding operation processors.

Returns
Const iterator.
AbstractBinding::BindingProcessorContainer::iterator kanzi::ExpressionBindingSource::endOperationProcessors ( )
inline

Gets an iterator to the end of binding operation processors.

Returns
Iterator.
AbstractBinding::BindingProcessorContainer::const_iterator kanzi::ExpressionBindingSource::endOperationProcessors ( ) const
inline

Gets an iterator to the end of binding operation processors.

Returns
Const iterator.
Variant* kanzi::ExpressionBindingSource::getTemporaryRegister ( size_t  idx)
inline

Accesses temporary register.

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

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to temporary register.
bool kanzi::ExpressionBindingSource::isCurrentValueRequired ( ) const
inline

Tells if current value is required.

If current value is required, the binding can only be executed when the value has been provided.

Returns
True if current value is required, false otherwise.
bool kanzi::ExpressionBindingSource::hasFixedOperations ( ) const
inline

Tells if the source contains fixed operations.

Fixed operations imply manual execution, and will not trigger the binding when source value changes.

Returns
True if there are fixed ops, false otherwise.
Variant* kanzi::ExpressionBindingSource::resolveRegister ( BindingExpressionArgumentType  argumentType)

Resolve register by index.

Parameters
argumentTypeArgument to resolve.
Returns
Pointer to variant.
BindingSourceRuntimePtr kanzi::ExpressionBindingSource::createRuntimeOverride ( )
overrideprotectedvirtual

Member Data Documentation

BindingOperationContainer kanzi::ExpressionBindingSource::m_operations
protected

Binding operations.

AbstractBinding::BindingProcessorContainer kanzi::ExpressionBindingSource::m_operationProcessors
protected

Binding operation processors that you can refer to from individual binding ops.

This is separate from the normal binding processors.

vector<Variant> kanzi::ExpressionBindingSource::m_registers[2]
protected

Registers for the expression binding source.

Index 0 are the temporary registers, index 1 are the constant registers.

ValueSourceContainer kanzi::ExpressionBindingSource::m_valueSources
protected

Expression value sources.

ValueSourceContainer kanzi::ExpressionBindingSource::m_dataSources
protected

Data source expression value sources.

bool kanzi::ExpressionBindingSource::m_isCurrentValueRequired
protected

Tells if current value is required.

bool kanzi::ExpressionBindingSource::m_hasFixedOperations
protected

Tells whether or not the binding contains fixed operations.


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