Olympe Engine
2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Source
BlueprintEditor
VSConnectionValidator.h
Go to the documentation of this file.
1
/**
2
* @file VSConnectionValidator.h
3
* @brief Stateless validator for exec connections in Visual Script graphs (Phase 20-B).
4
* @author Olympe Engine
5
* @date 2026-03-13
6
*
7
* @details
8
* VSConnectionValidator provides static validation helpers that are called
9
* from VisualScriptEditorPanel::RenderCanvas() before creating a new exec
10
* connection via ConnectExec(). The validator is intentionally stateless so
11
* that it can be called directly from unit tests without requiring ImGui or
12
* ImNodes context.
13
*
14
* C++14 compliant — no std::optional, structured bindings, std::filesystem,
15
* std::string_view.
16
*/
17
18
#pragma once
19
20
#include "../TaskSystem/TaskGraphTemplate.h"
21
#include <string>
22
23
namespace
Olympe
{
24
25
/**
26
* @class VSConnectionValidator
27
* @brief Stateless validator for exec connections in VS graphs.
28
*
29
* @details
30
* All methods are static. The class holds no state.
31
*
32
* C++14 compliant.
33
*/
34
class
VSConnectionValidator
35
{
36
public
:
37
/**
38
* @brief Returns true if adding an exec connection from srcNodeID/srcPinName
39
* to dstNodeID would be valid (no self-loop, no duplicate output pin,
40
* no cycle).
41
* Logs the rejection reason via SYSTEM_LOG if returning false.
42
*
43
* @param graph The current graph template to validate against.
44
* @param srcNodeID Source node identifier.
45
* @param srcPinName Source exec-out pin name (e.g. "Out", "Then").
46
* @param dstNodeID Destination node identifier.
47
* @return true The connection is valid and may be created.
48
* @return false The connection would produce an invalid graph state.
49
*/
50
static
bool
IsExecConnectionValid
(
const
TaskGraphTemplate
&
graph
,
51
int
srcNodeID
,
52
const
std::string&
srcPinName
,
53
int
dstNodeID
);
54
};
55
56
}
// namespace Olympe
GetComponentTypeID_Static
ComponentTypeID GetComponentTypeID_Static()
Definition
ECS_Entity.h:56
Olympe::TaskGraphTemplate
Immutable, shareable task graph asset.
Definition
TaskGraphTemplate.h:178
Olympe::VSConnectionValidator
Stateless validator for exec connections in VS graphs.
Definition
VSConnectionValidator.h:35
Olympe::VSConnectionValidator::IsExecConnectionValid
static bool IsExecConnectionValid(const TaskGraphTemplate &graph, int srcNodeID, const std::string &srcPinName, int dstNodeID)
Returns true if adding an exec connection from srcNodeID/srcPinName to dstNodeID would be valid (no s...
Definition
VSConnectionValidator.cpp:45
Olympe
< Provides AssetID and INVALID_ASSET_ID
Definition
BTEditorCommand.cpp:16
Generated on Mon Apr 13 2026 08:15:19 for Olympe Engine by
1.9.8