Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_expression_condition.h File Reference

Expression condition. More...

Enumerations

enum  KzuExpressionConditionOperand { KZU_EXPRESSION_CONDITION_OPERAND_LHS, KZU_EXPRESSION_CONDITION_OPERAND_RHS }
 Expression condition operand position. More...
 
enum  KzuExpressionConditionOperation {
  KZU_EXPRESSION_CONDITION_OPERATION_INVALID, KZU_EXPRESSION_CONDITION_OPERATION_EQUAL, KZU_EXPRESSION_CONDITION_OPERATION_NOT_EQUAL, KZU_EXPRESSION_CONDITION_OPERATION_LESS,
  KZU_EXPRESSION_CONDITION_OPERATION_GREATER, KZU_EXPRESSION_CONDITION_OPERATION_LESS_OR_EQUAL, KZU_EXPRESSION_CONDITION_OPERATION_GREATER_OR_EQUAL
}
 Expression condition operation. More...
 

Functions

kzsError kzuExpressionConditionCreate (const struct KzcMemoryManager *memoryManager, struct KzuUIDomain *uiDomain, struct KzuCondition **out_condition)
 Creates an expression condition that can be attached to triggers. More...
 
void kzuExpressionConditionSetOperation (struct KzuCondition *condition, enum KzuExpressionConditionOperation operation)
 Sets the comparisons operation for the condition. More...
 
kzsError kzuExpressionConditionSetOperandValue (struct KzuCondition *condition, enum KzuExpressionConditionOperand operand, const struct KzuVariant *value)
 Sets an operand in the comparison to be read from a fixed value. More...
 
kzsError kzuExpressionConditionSetOperandMessageArgument (const struct KzuCondition *condition, enum KzuExpressionConditionOperand operand, const struct KzuPropertyType *messageArgument, enum KzuPropertyField argumentField)
 Sets an operand in the comparison to be read from the forwarded message from the trigger. More...
 
kzsError kzuExpressionConditionSetOperandProperty (const struct KzuCondition *condition, enum KzuExpressionConditionOperand operand, kzString objectPath, const struct KzuPropertyType *propertyType, enum KzuPropertyField propertyField)
 Sets an operand in the comparison to be read from an objects property. More...
 
kzBool kzuConditionIsExpressionCondition (const struct KzuCondition *condition)
 Determine if condition is of ExpressionCondition type. More...
 
void kzuExpressionConditionSetUIDomain (struct KzuCondition *condition, struct KzuUIDomain *uiDomain)
 Sets UI domain to expression condition. More...
 

Detailed Description

Expression condition.

Copyright 2008-2019 by Rightware. All rights reserved.

Enumeration Type Documentation

Expression condition operand position.

Enumerator
KZU_EXPRESSION_CONDITION_OPERAND_LHS 

Left hand side operand.

KZU_EXPRESSION_CONDITION_OPERAND_RHS 

Right hand side operand.

Expression condition operation.

Enumerator
KZU_EXPRESSION_CONDITION_OPERATION_INVALID 

Invalid comparison.

KZU_EXPRESSION_CONDITION_OPERATION_EQUAL 

Equality comparison.

KZU_EXPRESSION_CONDITION_OPERATION_NOT_EQUAL 

Inequality comparison.

KZU_EXPRESSION_CONDITION_OPERATION_LESS 

Less than comparison.

KZU_EXPRESSION_CONDITION_OPERATION_GREATER 

Greater than comparison.

KZU_EXPRESSION_CONDITION_OPERATION_LESS_OR_EQUAL 

Less than or equal comparison.

KZU_EXPRESSION_CONDITION_OPERATION_GREATER_OR_EQUAL 

Greater than or equal comparison.

Function Documentation

kzsError kzuExpressionConditionCreate ( const struct KzcMemoryManager memoryManager,
struct KzuUIDomain uiDomain,
struct KzuCondition **  out_condition 
)

Creates an expression condition that can be attached to triggers.

Expression condition compares two operands with a specified comparison operator. Operand can be either a fixed value, a message argument from the message that the trigger forwards to the condition, or a property value that is read from an object specified by a relative path to the trigger object. Both operands and the operation must be set before the condition can be used.

void kzuExpressionConditionSetOperation ( struct KzuCondition condition,
enum KzuExpressionConditionOperation  operation 
)

Sets the comparisons operation for the condition.

Not all property types support all operations. If the operation is not supported, the condition evaluates to KZ_FALSE.

kzsError kzuExpressionConditionSetOperandValue ( struct KzuCondition condition,
enum KzuExpressionConditionOperand  operand,
const struct KzuVariant value 
)

Sets an operand in the comparison to be read from a fixed value.

kzsError kzuExpressionConditionSetOperandMessageArgument ( const struct KzuCondition condition,
enum KzuExpressionConditionOperand  operand,
const struct KzuPropertyType messageArgument,
enum KzuPropertyField  argumentField 
)

Sets an operand in the comparison to be read from the forwarded message from the trigger.

kzsError kzuExpressionConditionSetOperandProperty ( const struct KzuCondition condition,
enum KzuExpressionConditionOperand  operand,
kzString  objectPath,
const struct KzuPropertyType propertyType,
enum KzuPropertyField  propertyField 
)

Sets an operand in the comparison to be read from an objects property.

kzBool kzuConditionIsExpressionCondition ( const struct KzuCondition condition)

Determine if condition is of ExpressionCondition type.

void kzuExpressionConditionSetUIDomain ( struct KzuCondition condition,
struct KzuUIDomain uiDomain 
)

Sets UI domain to expression condition.