Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Olympe::VSConnectionValidator Class Reference

Stateless validator for exec connections in VS graphs. More...

#include <VSConnectionValidator.h>

Static Public Member Functions

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 self-loop, no duplicate output pin, no cycle).
 

Detailed Description

Stateless validator for exec connections in VS graphs.

All methods are static. The class holds no state.

C++14 compliant.

Definition at line 34 of file VSConnectionValidator.h.

Member Function Documentation

◆ IsExecConnectionValid()

bool Olympe::VSConnectionValidator::IsExecConnectionValid ( const TaskGraphTemplate graph,
int  srcNodeID,
const std::string &  srcPinName,
int  dstNodeID 
)
static

Returns true if adding an exec connection from srcNodeID/srcPinName to dstNodeID would be valid (no self-loop, no duplicate output pin, no cycle).

Logs the rejection reason via SYSTEM_LOG if returning false.

Parameters
graphThe current graph template to validate against.
srcNodeIDSource node identifier.
srcPinNameSource exec-out pin name (e.g. "Out", "Then").
dstNodeIDDestination node identifier.
Returns
true The connection is valid and may be created.
false The connection would produce an invalid graph state.

Definition at line 45 of file VSConnectionValidator.cpp.

References GetComponentTypeID_Static(), Olympe::NodeTypeAcceptsExecInput(), SYSTEM_LOG, and Olympe::ExecPinConnection::TargetNodeID.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: