![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
One entry in a NodeBranch's conditions list. More...
#include <NodeConditionRef.h>
Public Member Functions | |
| NodeConditionRef () | |
| Default constructor — empty preset ID, LogicalOp::Start. | |
| NodeConditionRef (const std::string &pid, LogicalOp op) | |
| Convenience constructor. | |
| std::string | GetLogicalOpString () const |
| Returns the logical-op as a display string ("Start", "And", "Or"). | |
| bool | HasLeftPin () const |
| Returns true when a left-side DynamicDataPin is assigned. | |
| bool | HasRightPin () const |
| Returns true when a right-side DynamicDataPin is assigned. | |
| nlohmann::json | ToJson () const |
| Serializes this ref to a JSON object. | |
Static Public Member Functions | |
| static NodeConditionRef | FromJson (const nlohmann::json &data) |
| Deserializes a NodeConditionRef from a JSON object. | |
Public Attributes | |
| std::string | presetID |
| UUID of the referenced ConditionPreset. | |
| LogicalOp | logicalOp |
| Combinator with previous condition (ignored for first) | |
| std::string | leftPinID |
| DynamicDataPin UUID for left Pin operand (or empty) | |
| std::string | rightPinID |
| DynamicDataPin UUID for right Pin operand (or empty) | |
One entry in a NodeBranch's conditions list.
References a ConditionPreset by UUID. If the referenced preset's left or right operand is in Pin mode, leftPinID / rightPinID store the UUID of the corresponding DynamicDataPin so the runtime evaluator can find the live float value.
Definition at line 45 of file NodeConditionRef.h.
| Olympe::NodeConditionRef::NodeConditionRef | ( | ) |
Default constructor — empty preset ID, LogicalOp::Start.
Definition at line 20 of file NodeConditionRef.cpp.
Convenience constructor.
| pid | Preset UUID to reference. |
| op | Logical combinator (Start for the first condition). |
Definition at line 28 of file NodeConditionRef.cpp.
|
static |
Deserializes a NodeConditionRef from a JSON object.
Definition at line 76 of file NodeConditionRef.cpp.
References Olympe::And, GetComponentTypeID_Static(), Olympe::Or, presetID, and Olympe::Start.
Referenced by Olympe::TaskGraphLoader::ParseNodeV4().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Olympe::NodeConditionRef::GetLogicalOpString | ( | ) | const |
Returns the logical-op as a display string ("Start", "And", "Or").
Definition at line 40 of file NodeConditionRef.cpp.
References Olympe::And, logicalOp, Olympe::Or, and Olympe::Start.
Referenced by ToJson().
Here is the caller graph for this function:| bool Olympe::NodeConditionRef::HasLeftPin | ( | ) | const |
Returns true when a left-side DynamicDataPin is assigned.
Definition at line 51 of file NodeConditionRef.cpp.
References leftPinID.
| bool Olympe::NodeConditionRef::HasRightPin | ( | ) | const |
Returns true when a right-side DynamicDataPin is assigned.
Definition at line 56 of file NodeConditionRef.cpp.
References rightPinID.
| nlohmann::json Olympe::NodeConditionRef::ToJson | ( | ) | const |
Serializes this ref to a JSON object.
Definition at line 65 of file NodeConditionRef.cpp.
References GetComponentTypeID_Static(), GetLogicalOpString(), leftPinID, presetID, and rightPinID.
Here is the call graph for this function:| std::string Olympe::NodeConditionRef::leftPinID |
DynamicDataPin UUID for left Pin operand (or empty)
Definition at line 48 of file NodeConditionRef.h.
Referenced by HasLeftPin(), and ToJson().
| LogicalOp Olympe::NodeConditionRef::logicalOp |
Combinator with previous condition (ignored for first)
Definition at line 47 of file NodeConditionRef.h.
Referenced by GetLogicalOpString().
| std::string Olympe::NodeConditionRef::presetID |
UUID of the referenced ConditionPreset.
Definition at line 46 of file NodeConditionRef.h.
Referenced by FromJson(), ToJson(), and Olympe::NodeConditionsPanel::Validate().
| std::string Olympe::NodeConditionRef::rightPinID |
DynamicDataPin UUID for right Pin operand (or empty)
Definition at line 49 of file NodeConditionRef.h.
Referenced by HasRightPin(), and ToJson().