Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
DataPinEvaluator.h
Go to the documentation of this file.
1/**
2 * @file DataPinEvaluator.h
3 * @brief Stack-based recursive evaluation of data pin networks for "data pure" nodes.
4 * @author Olympe Engine
5 * @date 2026-03-20
6 *
7 * @details
8 * Implements depth-first stack-based evaluation of connected data pins.
9 * All implementations are inline to ensure proper compilation.
10 *
11 * C++14 compliant - no C++17/20 features.
12 */
13
14#pragma once
15
16#include <string>
17#include <vector>
18#include <unordered_set>
19#include <unordered_map>
20#include <stdexcept>
21#include <sstream>
22#include <cmath>
23#include <limits>
24
25#include "TaskGraphTypes.h"
26
27namespace Olympe {
28
29// Forward declarations
30class TaskGraphTemplate;
31class LocalBlackboard;
32struct TaskRunnerComponent;
33struct DataPinConnection;
34struct TaskNodeDefinition;
35
36/**
37 * @enum DataPinEvalStatus
38 * @brief Result status of data pin evaluation.
39 */
41 Success, ///< Evaluation completed successfully
42 CycleDetected, ///< Circular dependency detected in data pin network
43 InvalidNode, ///< Node ID not found in template
44 EvaluationError ///< Runtime error during evaluation (e.g., type mismatch)
45};
46
47/**
48 * @struct DataPinEvaluationResult
49 * @brief Result of a single data pin evaluation attempt.
50 */
56
57/**
58 * @class DataPinEvaluator
59 * @brief Evaluates data pin networks using stack-based depth-first recursion.
60 * Inline implementation to avoid linker issues.
61 */
63public:
64
65 /// Maximum recursion depth to prevent stack overflow
66 static constexpr int32_t MAX_RECURSION_DEPTH = 32;
67
68 /**
69 * @brief Evaluate all input data pins for a given node before execution.
70 * Inline implementation - integrates with VSGraphExecutor.
71 */
72 static inline bool EvaluateNodeInputPins(
73 int32_t nodeID,
77};
78
79} // namespace Olympe
80
81// Include inline implementation
83
Inline implementation of DataPinEvaluator.
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Core enumerations and TaskValue type-safe variant for the Atomic Task System.
Evaluates data pin networks using stack-based depth-first recursion.
static constexpr int32_t MAX_RECURSION_DEPTH
Maximum recursion depth to prevent stack overflow.
static bool EvaluateNodeInputPins(int32_t nodeID, const TaskGraphTemplate &tmpl, TaskRunnerComponent &runner, LocalBlackboard &localBB)
Evaluate all input data pins for a given node before execution.
Simple map-based blackboard for task graph runtime state.
Immutable, shareable task graph asset.
C++14-compliant type-safe value container for task parameters.
< Provides AssetID and INVALID_ASSET_ID
DataPinEvalStatus
Result status of data pin evaluation.
@ Success
Evaluation completed successfully.
@ InvalidNode
Node ID not found in template.
@ EvaluationError
Runtime error during evaluation (e.g., type mismatch)
@ CycleDetected
Circular dependency detected in data pin network.
Result of a single data pin evaluation attempt.
Per-entity runtime state for task graph execution.