![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
A data-input pin created dynamically for a Pin-mode operand. More...
#include <DynamicDataPin.h>
Public Member Functions | |
| DynamicDataPin () | |
| Default constructor — zero-initialised. | |
| DynamicDataPin (int condIdx, OperandPosition pos, const std::string &condPreview) | |
| Convenience constructor. | |
| std::string | GetDisplayLabel () const |
| Returns the full display label shown on the node. | |
| std::string | GetShortLabel () const |
| Returns the short label for use as a pin connector slot. | |
| nlohmann::json | ToJson () const |
| Serializes this pin to a JSON object. | |
Static Public Member Functions | |
| static std::string | GenerateUniqueID () |
| Generates a globally unique identifier string (UUID v4-style). | |
| static DynamicDataPin | FromJson (const nlohmann::json &data) |
| Deserializes a DynamicDataPin from a JSON object. | |
Public Attributes | |
| std::string | id |
| Global unique UUID (e.g. "pin_inst_abc123") | |
| int | conditionIndex |
| Index in node.conditions (0-based) | |
| OperandPosition | position |
| Left or Right operand side. | |
| std::string | label |
| Display label (set at construction) | |
| std::string | nodePinID |
| ImGui/ImNodes pin ID (assigned at render time) | |
| float | dataValue |
| Runtime float value received from connected node. | |
| int | sequenceNumber |
| 1-based sequence index across all pins on the node (for "Pin-in #N" label) | |
A data-input pin created dynamically for a Pin-mode operand.
Created automatically by the Dynamic Pin Manager (Phase 24.3) when a ConditionPreset containing a Pin-mode operand is assigned to a NodeBranch. The nodePinID field is populated at render time (ImNodes pin ID).
Definition at line 47 of file DynamicDataPin.h.
| Olympe::DynamicDataPin::DynamicDataPin | ( | ) |
Default constructor — zero-initialised.
Definition at line 31 of file DynamicDataPin.cpp.
| Olympe::DynamicDataPin::DynamicDataPin | ( | int | condIdx, |
| OperandPosition | pos, | ||
| const std::string & | condPreview | ||
| ) |
Convenience constructor.
| condIdx | Index of the owning condition in node.conditions. |
| pos | Which operand side (Left or Right). |
| condPreview | Short preview of the parent condition for the label (e.g. "[mSpeed] == [Pin:1]"). |
Definition at line 46 of file DynamicDataPin.cpp.
References GetComponentTypeID_Static(), label, and Olympe::Left.
Here is the call graph for this function:
|
static |
Deserializes a DynamicDataPin from a JSON object.
Definition at line 130 of file DynamicDataPin.cpp.
References GetComponentTypeID_Static(), id, Olympe::Left, and Olympe::Right.
Here is the call graph for this function:
|
static |
Generates a globally unique identifier string (UUID v4-style).
Definition at line 79 of file DynamicDataPin.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:| std::string Olympe::DynamicDataPin::GetDisplayLabel | ( | ) | const |
Returns the full display label shown on the node.
Format: "In #<condIdx+1><L|R>: <condPreview>" Example: "In #3L: [mSpeed] == [Pin:1]"
Definition at line 66 of file DynamicDataPin.cpp.
References label.
| std::string Olympe::DynamicDataPin::GetShortLabel | ( | ) | const |
Returns the short label for use as a pin connector slot.
Format: "Pin-in #<sequenceNumber>" Example: "Pin-in #1"
Definition at line 71 of file DynamicDataPin.cpp.
References GetComponentTypeID_Static(), and sequenceNumber.
Here is the call graph for this function:| nlohmann::json Olympe::DynamicDataPin::ToJson | ( | ) | const |
Serializes this pin to a JSON object.
Definition at line 117 of file DynamicDataPin.cpp.
References conditionIndex, dataValue, GetComponentTypeID_Static(), id, label, Olympe::Left, nodePinID, and position.
Here is the call graph for this function:| int Olympe::DynamicDataPin::conditionIndex |
Index in node.conditions (0-based)
Definition at line 49 of file DynamicDataPin.h.
Referenced by ToJson().
| float Olympe::DynamicDataPin::dataValue |
Runtime float value received from connected node.
Definition at line 53 of file DynamicDataPin.h.
Referenced by ToJson().
| std::string Olympe::DynamicDataPin::id |
Global unique UUID (e.g. "pin_inst_abc123")
Definition at line 48 of file DynamicDataPin.h.
Referenced by FromJson(), and ToJson().
| std::string Olympe::DynamicDataPin::label |
Display label (set at construction)
Definition at line 51 of file DynamicDataPin.h.
Referenced by DynamicDataPin(), GetDisplayLabel(), and ToJson().
| std::string Olympe::DynamicDataPin::nodePinID |
ImGui/ImNodes pin ID (assigned at render time)
Definition at line 52 of file DynamicDataPin.h.
Referenced by ToJson().
| OperandPosition Olympe::DynamicDataPin::position |
| int Olympe::DynamicDataPin::sequenceNumber |
1-based sequence index across all pins on the node (for "Pin-in #N" label)
Definition at line 54 of file DynamicDataPin.h.
Referenced by GetShortLabel().