21#include "../../third_party/nlohmann/json.hpp"
ComponentTypeID GetComponentTypeID_Static()
< Provides AssetID and INVALID_ASSET_ID
OperandMode
Discriminates which source the operand draws its value from.
@ Variable
References a blackboard variable by ID (string key)
@ Const
Literal numeric constant (double)
@ Pin
External data input pin on the node (identified by label)
One side of a ConditionPreset comparison expression.
double constValue
Literal constant (mode == Const)
static Operand FromJson(const nlohmann::json &data)
Deserializes an Operand from a JSON object.
nlohmann::json ToJson() const
Serializes this Operand to a JSON object.
bool IsVariable() const
Returns true when mode == Variable.
bool IsPin() const
Returns true when mode == Pin.
static Operand CreateVariable(const std::string &variableID)
Factory — creates a Variable-mode operand.
std::string stringValue
Variable ID or Pin label (mode == Variable|Pin)
static Operand CreatePin(const std::string &pinLabel)
Factory — creates a Pin-mode operand.
std::string GetDisplayString() const
Returns a human-readable display string.
static Operand CreateConst(double constVal)
Factory — creates a Const-mode operand.
bool IsConst() const
Returns true when mode == Const.
OperandMode mode
Discriminator tag.
Operand()
Default: Variable mode, empty string.