Kanzi  3.9.6
Kanzi Engine 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 (BindingLookupContextPtr lookupContext)
 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 (BindingLookupContextPtr lookupContext) 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

◆ ValueSourceContainer

Container for expression value source create info.

◆ BindingOperationContainer

Container for binding expressions.

Constructor & Destructor Documentation

◆ ExpressionBindingSource()

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

◆ create() [1/4]

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.

◆ create() [2/4]

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.

◆ create() [3/4]

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.

◆ create() [4/4]

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.

◆ beginValueSources()

ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::beginValueSources ( ) const
inline

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

Returns
Const iterator.

◆ endValueSources()

ValueSourceContainer::const_iterator kanzi::ExpressionBindingSource::endValueSources ( ) const
inline

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

Returns
Const iterator.

◆ beginDataSources()

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.

◆ endDataSources()

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.

◆ beginBindingOperations() [1/2]

BindingOperationContainer::iterator kanzi::ExpressionBindingSource::beginBindingOperations ( )
inline

Gets an iterator to the beginning of binding operations.

Returns
Iterator.

◆ beginBindingOperations() [2/2]

BindingOperationContainer::const_iterator kanzi::ExpressionBindingSource::beginBindingOperations ( ) const
inline

Gets an iterator to the beginning of binding operations.

Returns
Iterator.

◆ endBindingOperations() [1/2]

BindingOperationContainer::iterator kanzi::ExpressionBindingSource::endBindingOperations ( )
inline

Gets an iterator to the end of binding operations.

Returns
Iterator.

◆ endBindingOperations() [2/2]

BindingOperationContainer::const_iterator kanzi::ExpressionBindingSource::endBindingOperations ( ) const
inline

Gets an iterator to the end of binding operations.

Returns
Const iterator.

◆ beginOperationProcessors() [1/2]

AbstractBinding::BindingProcessorContainer::iterator kanzi::ExpressionBindingSource::beginOperationProcessors ( )
inline

Gets an iterator to the beginning of binding operation processors.

Returns
Iterator.

◆ beginOperationProcessors() [2/2]

AbstractBinding::BindingProcessorContainer::const_iterator kanzi::ExpressionBindingSource::beginOperationProcessors ( ) const
inline

Gets an iterator to the beginning of binding operation processors.

Returns
Const iterator.

◆ endOperationProcessors() [1/2]

AbstractBinding::BindingProcessorContainer::iterator kanzi::ExpressionBindingSource::endOperationProcessors ( )
inline

Gets an iterator to the end of binding operation processors.

Returns
Iterator.

◆ endOperationProcessors() [2/2]

AbstractBinding::BindingProcessorContainer::const_iterator kanzi::ExpressionBindingSource::endOperationProcessors ( ) const
inline

Gets an iterator to the end of binding operation processors.

Returns
Const iterator.

◆ getTemporaryRegister() [1/2]

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

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to temporary register.

◆ getTemporaryRegister() [2/2]

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

Accesses temporary register.

Parameters
idxIndex.
Returns
Reference to temporary register.

◆ isCurrentValueRequired()

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.

◆ hasFixedOperations()

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.

◆ resolveRegister()

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

Resolve register by index.

Parameters
argumentTypeArgument to resolve.
Returns
Pointer to variant.

◆ createRuntimeOverride()

BindingSourceRuntimePtr kanzi::ExpressionBindingSource::createRuntimeOverride ( BindingLookupContextPtr  lookupContext)
overrideprotectedvirtual

Member Data Documentation

◆ m_operations

BindingOperationContainer kanzi::ExpressionBindingSource::m_operations
protected

Binding operations.

◆ m_operationProcessors

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.

◆ m_registers

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.

◆ m_valueSources

ValueSourceContainer kanzi::ExpressionBindingSource::m_valueSources
protected

Expression value sources.

◆ m_dataSources

ValueSourceContainer kanzi::ExpressionBindingSource::m_dataSources
protected

Data source expression value sources.

◆ m_isCurrentValueRequired

bool kanzi::ExpressionBindingSource::m_isCurrentValueRequired
protected

Tells if current value is required.

◆ m_hasFixedOperations

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: