Kanzi  3.9.6
Kanzi Engine API
kanzi::BindingExpressionOpCode Struct Reference

Expression binding operation. More...

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

Public Member Functions

 BindingExpressionOpCode ()
 Empty constructor. More...
 
 BindingExpressionOpCode (BindingExpressionArgumentType argument1, PropertyField field1, BindingExpressionArgumentType argument2, PropertyField field2, BindingExpressionArgumentType argument3, PropertyField field3, KzuExpressionValidatorOperation operation, unsigned int outputIndex, PropertyField outputField)
 Constructor (all parameters). More...
 
 BindingExpressionOpCode (BindingExpressionArgumentType argument1, PropertyField field1, BindingExpressionArgumentType argument2, PropertyField field2, KzuExpressionValidatorOperation operation, unsigned int outputIndex, PropertyField outputField)
 Constructor (two parameters). More...
 
 BindingExpressionOpCode (BindingExpressionArgumentType argument1, PropertyField field1, KzuExpressionValidatorOperation operation, unsigned int outputIndex, PropertyField outputField)
 Constructor (one parameters). More...
 
 BindingExpressionOpCode (KzuExpressionValidatorOperation operation)
 Constructor (instruction processor). More...
 

Public Attributes

BindingExpressionFunction expressionFunction
 Operation function pointer. More...
 
KzuExpressionValidatorOperation expressionOperation
 Id of expression operation. More...
 
PropertyField firstArgumentField
 Field of first argument. More...
 
BindingExpressionArgumentType firstArgumentRegister
 First argument of the operation. More...
 
PropertyField outputField
 Field of output where result of the operation should be written. More...
 
unsigned int outputRegisterIndex
 Index of output register where result of the operation should be written. More...
 
PropertyField secondArgumentField
 Field of second argument. More...
 
BindingExpressionArgumentType secondArgumentRegister
 Second argument of the operation. More...
 
PropertyField thirdArgumentField
 Field of third argument. More...
 
BindingExpressionArgumentType thirdArgumentRegister
 Third argument of the operation. More...
 

Detailed Description

Expression binding operation.

Expression bindings execute an arbitrary number of operations that you define using expression binding operation codes. Expression binding operations are similar to regular assembler instructions and consist of:

  • One to three source arguments register codes.
  • One to three source fields, one for each register.
  • Operation code.
  • Output register index.
  • Output register field.

The output parameter is always a temporary register, because constant, object property source, and data source registers are not modified by expressions.

An expression binding operation:

  1. Determines how many of the source arguments and fields are used
  2. Reads values from registers (using fields unless set to PropertyFieldWhole)
  3. Executes the operation determined by the operation code using the values read from the registers
  4. Writes the result to the temporary register specified by the index

Animation operations are a special case. The operation code itself, when greater or equal to animation operation code ID, specifies which animation binding processor (by index) to use. This is because BindingExpressionOpCode is a minimal struct with no internal state, while an animation processor must refer to an animation resource. The binding runtime owns the animation binding processors.

Constructor & Destructor Documentation

◆ BindingExpressionOpCode() [1/5]

kanzi::BindingExpressionOpCode::BindingExpressionOpCode ( )
inlineexplicit

Empty constructor.

All fields set to 0. The opcode is invalid.

◆ BindingExpressionOpCode() [2/5]

kanzi::BindingExpressionOpCode::BindingExpressionOpCode ( BindingExpressionArgumentType  argument1,
PropertyField  field1,
BindingExpressionArgumentType  argument2,
PropertyField  field2,
BindingExpressionArgumentType  argument3,
PropertyField  field3,
KzuExpressionValidatorOperation  operation,
unsigned int  outputIndex,
PropertyField  outputField 
)
inlineexplicit

Constructor (all parameters).

Parameters
argument1First argument register.
field1First argument field.
argument2Second argument register.
field2Second argument field.
argument3Third argument register.
field3Third argument field.
operationExpression operation.
outputIndexOutput temporary register index.
outputFieldOutput field.

◆ BindingExpressionOpCode() [3/5]

kanzi::BindingExpressionOpCode::BindingExpressionOpCode ( BindingExpressionArgumentType  argument1,
PropertyField  field1,
BindingExpressionArgumentType  argument2,
PropertyField  field2,
KzuExpressionValidatorOperation  operation,
unsigned int  outputIndex,
PropertyField  outputField 
)
inlineexplicit

Constructor (two parameters).

Parameters
argument1First argument register.
field1First argument field.
argument2Second argument register.
field2Second argument field.
operationExpression operation.
outputIndexOutput temporary register index.
outputFieldOutput field.

◆ BindingExpressionOpCode() [4/5]

kanzi::BindingExpressionOpCode::BindingExpressionOpCode ( BindingExpressionArgumentType  argument1,
PropertyField  field1,
KzuExpressionValidatorOperation  operation,
unsigned int  outputIndex,
PropertyField  outputField 
)
inlineexplicit

Constructor (one parameters).

Parameters
argument1First argument register.
field1First argument field.
operationExpression operation.
outputIndexOutput temporary register index.
outputFieldOutput field.

◆ BindingExpressionOpCode() [5/5]

kanzi::BindingExpressionOpCode::BindingExpressionOpCode ( KzuExpressionValidatorOperation  operation)
inlineexplicit

Constructor (instruction processor).

Register settings should have been set to the operation processor itself.

Parameters
operationExpression operation.

Member Data Documentation

◆ firstArgumentRegister

BindingExpressionArgumentType kanzi::BindingExpressionOpCode::firstArgumentRegister

First argument of the operation.

◆ firstArgumentField

PropertyField kanzi::BindingExpressionOpCode::firstArgumentField

Field of first argument.

◆ secondArgumentRegister

BindingExpressionArgumentType kanzi::BindingExpressionOpCode::secondArgumentRegister

Second argument of the operation.

◆ secondArgumentField

PropertyField kanzi::BindingExpressionOpCode::secondArgumentField

Field of second argument.

◆ thirdArgumentRegister

BindingExpressionArgumentType kanzi::BindingExpressionOpCode::thirdArgumentRegister

Third argument of the operation.

◆ thirdArgumentField

PropertyField kanzi::BindingExpressionOpCode::thirdArgumentField

Field of third argument.

◆ expressionOperation

KzuExpressionValidatorOperation kanzi::BindingExpressionOpCode::expressionOperation

Id of expression operation.

◆ outputRegisterIndex

unsigned int kanzi::BindingExpressionOpCode::outputRegisterIndex

Index of output register where result of the operation should be written.

◆ outputField

PropertyField kanzi::BindingExpressionOpCode::outputField

Field of output where result of the operation should be written.

◆ expressionFunction

BindingExpressionFunction kanzi::BindingExpressionOpCode::expressionFunction

Operation function pointer.


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