![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton that validates a TaskGraphTemplate and tracks selected node. More...
#include <GraphValidationPanel.h>
Public Member Functions | |
| void | Validate (const TaskGraphTemplate &graph) |
Clears previous results and validates graph. | |
| const std::vector< GraphValidationError > & | GetErrors () const |
| Returns the current list of validation findings. | |
| bool | HasErrors () const |
| Returns true if there are any findings of any severity. | |
| bool | HasCriticalErrors () const |
| Returns true if any finding has severity Critical. | |
| void | Clear () |
| Clears all findings and resets the selected node. | |
| void | OnErrorClick (int nodeId) |
Records nodeId as the currently selected node. | |
| int | GetSelectedNodeId () const |
| Returns the node ID set by the most recent OnErrorClick() call (-1 if none). | |
Static Public Member Functions | |
| static GraphValidationPanel & | Get () |
| Returns the single shared instance. | |
Private Member Functions | |
| GraphValidationPanel () | |
| void | CheckDeadEnds (const TaskGraphTemplate &graph) |
| Flags nodes whose exec-output pins have no outgoing connection. | |
| void | CheckMissingConnections (const TaskGraphTemplate &graph) |
| Flags SubGraph nodes that have no SubGraphPath set. | |
| void | CheckCycles (const TaskGraphTemplate &graph) |
| Flags cycles detected by DFS over ExecConnections. | |
| void | AddError (int nodeId, const std::string &message, ValidationSeverity severity) |
Private Attributes | |
| std::vector< GraphValidationError > | m_Errors |
| int | m_SelectedNodeId |
Singleton that validates a TaskGraphTemplate and tracks selected node.
Typical usage:
Definition at line 72 of file GraphValidationPanel.h.
|
private |
Definition at line 32 of file GraphValidationPanel.cpp.
|
private |
Definition at line 41 of file GraphValidationPanel.cpp.
References GetComponentTypeID_Static(), m_Errors, and Olympe::GraphValidationError::nodeId.
Referenced by CheckCycles(), CheckDeadEnds(), CheckMissingConnections(), and Validate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Flags cycles detected by DFS over ExecConnections.
Definition at line 142 of file GraphValidationPanel.cpp.
References AddError(), Olympe::Critical, and GetComponentTypeID_Static().
Referenced by Validate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Flags nodes whose exec-output pins have no outgoing connection.
Definition at line 79 of file GraphValidationPanel.cpp.
References AddError(), Olympe::Critical, Olympe::EntryPoint, Olympe::Error, Olympe::GetBBValue, GetComponentTypeID_Static(), Olympe::MathOp, and Olympe::SetBBValue.
Referenced by Validate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Flags SubGraph nodes that have no SubGraphPath set.
Definition at line 116 of file GraphValidationPanel.cpp.
References AddError(), Olympe::Critical, Olympe::Error, GetComponentTypeID_Static(), Olympe::NODE_INDEX_NONE, and Olympe::SubGraph.
Referenced by Validate().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::GraphValidationPanel::Clear | ( | ) |
Clears all findings and resets the selected node.
Definition at line 243 of file GraphValidationPanel.cpp.
References m_Errors, and m_SelectedNodeId.
Referenced by Validate().
Here is the caller graph for this function:
|
static |
Returns the single shared instance.
Definition at line 22 of file GraphValidationPanel.cpp.
| const std::vector< GraphValidationError > & Olympe::GraphValidationPanel::GetErrors | ( | ) | const |
Returns the current list of validation findings.
Definition at line 223 of file GraphValidationPanel.cpp.
References m_Errors.
| int Olympe::GraphValidationPanel::GetSelectedNodeId | ( | ) | const |
Returns the node ID set by the most recent OnErrorClick() call (-1 if none).
Definition at line 254 of file GraphValidationPanel.cpp.
References m_SelectedNodeId.
| bool Olympe::GraphValidationPanel::HasCriticalErrors | ( | ) | const |
Returns true if any finding has severity Critical.
Definition at line 233 of file GraphValidationPanel.cpp.
References Olympe::Critical, GetComponentTypeID_Static(), and m_Errors.
Here is the call graph for this function:| bool Olympe::GraphValidationPanel::HasErrors | ( | ) | const |
Returns true if there are any findings of any severity.
Definition at line 228 of file GraphValidationPanel.cpp.
References m_Errors.
Records nodeId as the currently selected node.
UI can read this to pan the canvas to the offending node.
Definition at line 249 of file GraphValidationPanel.cpp.
References m_SelectedNodeId.
| void Olympe::GraphValidationPanel::Validate | ( | const TaskGraphTemplate & | graph | ) |
Clears previous results and validates graph.
Definition at line 56 of file GraphValidationPanel.cpp.
References AddError(), CheckCycles(), CheckDeadEnds(), CheckMissingConnections(), Clear(), Olympe::Critical, GetComponentTypeID_Static(), m_Errors, and SYSTEM_LOG.
Here is the call graph for this function:
|
private |
Definition at line 154 of file GraphValidationPanel.h.
Referenced by AddError(), Clear(), GetErrors(), HasCriticalErrors(), HasErrors(), and Validate().
|
private |
Definition at line 155 of file GraphValidationPanel.h.
Referenced by Clear(), GetSelectedNodeId(), and OnErrorClick().