Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Olympe::ConditionRef Struct Reference

Stores the complete reference for one condition including operand-to-DynamicDataPin mapping. More...

#include <ConditionRef.h>

+ Collaboration diagram for Olympe::ConditionRef:

Public Member Functions

nlohmann::json ToJson () const
 Serializes this ConditionRef to a JSON object.
 

Static Public Member Functions

static ConditionRef FromJson (const nlohmann::json &data)
 Deserializes a ConditionRef from a JSON object.
 

Public Attributes

int conditionIndex = -1
 Index in the Branch/While node's conditions[] array.
 
OperandRef leftOperand
 Left-hand side of the comparison.
 
std::string operatorStr = "=="
 Comparison operator: "==", "<=", ">=", "!=", "<", ">".
 
OperandRef rightOperand
 Right-hand side of the comparison.
 
VariableType compareType = VariableType::Float
 Expected value type of both operands.
 

Detailed Description

Stores the complete reference for one condition including operand-to-DynamicDataPin mapping.

Conditions whose operands are in Pin mode automatically have DynamicDataPin objects generated for them by DynamicDataPinManager. The panel renders this structure with editable fields for each component (operand values, operator, logical combinator).

Multiple ConditionRef objects on a single node are evaluated in order, combined via their implicit logical operators (And/Or).

Definition at line 95 of file ConditionRef.h.

Member Function Documentation

◆ FromJson()

ConditionRef Olympe::ConditionRef::FromJson ( const nlohmann::json data)
static

Deserializes a ConditionRef from a JSON object.

Definition at line 96 of file ConditionRef.cpp.

References Olympe::Bool, conditionIndex, Olympe::Float, Olympe::OperandRef::FromJson(), GetComponentTypeID_Static(), Olympe::Int, and Olympe::String.

+ Here is the call graph for this function:

◆ ToJson()

nlohmann::json Olympe::ConditionRef::ToJson ( ) const

Serializes this ConditionRef to a JSON object.

Definition at line 73 of file ConditionRef.cpp.

References Olympe::Bool, compareType, conditionIndex, Olympe::Float, GetComponentTypeID_Static(), Olympe::Int, leftOperand, operatorStr, rightOperand, Olympe::String, and Olympe::OperandRef::ToJson().

+ Here is the call graph for this function:

Member Data Documentation

◆ compareType

VariableType Olympe::ConditionRef::compareType = VariableType::Float

Expected value type of both operands.

Definition at line 105 of file ConditionRef.h.

Referenced by ToJson().

◆ conditionIndex

int Olympe::ConditionRef::conditionIndex = -1

Index in the Branch/While node's conditions[] array.

Definition at line 97 of file ConditionRef.h.

Referenced by Olympe::NodeConditionsPanel::AddCondition(), FromJson(), Olympe::TaskGraphLoader::ParseNodeV4(), Olympe::NodeConditionsPanel::RenderConditionList(), and ToJson().

◆ leftOperand

OperandRef Olympe::ConditionRef::leftOperand

Left-hand side of the comparison.

Definition at line 100 of file ConditionRef.h.

Referenced by Olympe::NodeConditionsPanel::RenderConditionsPreview(), and ToJson().

◆ operatorStr

std::string Olympe::ConditionRef::operatorStr = "=="

Comparison operator: "==", "<=", ">=", "!=", "<", ">".

Definition at line 101 of file ConditionRef.h.

Referenced by Olympe::DynamicDataPinManager::SyncPins(), and ToJson().

◆ rightOperand

OperandRef Olympe::ConditionRef::rightOperand

Right-hand side of the comparison.

Definition at line 102 of file ConditionRef.h.

Referenced by ToJson().


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