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

ImGui panel for blueprint execution testing and validation. More...

#include <ExecutionTestPanel.h>

+ Collaboration diagram for Olympe::ExecutionTestPanel:

Public Member Functions

 ExecutionTestPanel ()
 
 ~ExecutionTestPanel ()
 
void Initialize ()
 
void Shutdown ()
 
void Render ()
 Renders the test execution panel window.
 
std::vector< ValidationErrorRunExecutionTest (const TaskGraphTemplate &tmpl)
 Runs execution test on the specified template.
 
void DisplayTrace (const GraphExecutionTracer &tracer)
 Display a pre-computed trace (for BehaviorTree or native executors).
 
bool HasResults () const
 Returns true if there are test results to display.
 
const GraphExecutionTracerGetLastTrace () const
 Returns the last execution trace.
 
void SetVisible (bool v)
 Show / hide the panel.
 
bool IsVisible () const
 
std::string GetExecutionLog () const
 Returns the execution log as a formatted string.
 
std::string GetTestSummary () const
 Returns a summary of the last test run.
 

Private Member Functions

void RenderTestControls ()
 
void RenderTraceLog ()
 
void RenderErrors ()
 
void RenderSummary ()
 
void RenderExecutionEventRow (const ExecutionEvent &event, size_t rowIndex)
 

Private Attributes

bool m_visible = true
 
bool m_lastTestRun = false
 
GraphExecutionSimulator m_simulator
 
GraphExecutionTracer m_lastTracer
 
std::vector< ValidationErrorm_lastTestErrors
 
SimulationOptions m_testOptions
 
int32_t m_selectedEventIndex = -1
 
bool m_showTraceLog = true
 
bool m_showErrors = true
 
bool m_autoScroll = true
 

Detailed Description

ImGui panel for blueprint execution testing and validation.

Definition at line 33 of file ExecutionTestPanel.h.

Constructor & Destructor Documentation

◆ ExecutionTestPanel()

Olympe::ExecutionTestPanel::ExecutionTestPanel ( )

Definition at line 16 of file ExecutionTestPanel.cpp.

◆ ~ExecutionTestPanel()

Olympe::ExecutionTestPanel::~ExecutionTestPanel ( )

Definition at line 22 of file ExecutionTestPanel.cpp.

Member Function Documentation

◆ DisplayTrace()

void Olympe::ExecutionTestPanel::DisplayTrace ( const GraphExecutionTracer tracer)

Display a pre-computed trace (for BehaviorTree or native executors).

Parameters
tracerThe execution trace to display

Used by BehaviorTreeRenderer to pass trace from BehaviorTreeExecutor

Definition at line 104 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), Olympe::GraphExecutionTracer::GetEvents(), m_lastTestErrors, m_lastTestRun, m_lastTracer, and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ GetExecutionLog()

std::string Olympe::ExecutionTestPanel::GetExecutionLog ( ) const

Returns the execution log as a formatted string.

Definition at line 114 of file ExecutionTestPanel.cpp.

References Olympe::GraphExecutionTracer::GetTraceLog(), and m_lastTracer.

+ Here is the call graph for this function:

◆ GetLastTrace()

const GraphExecutionTracer & Olympe::ExecutionTestPanel::GetLastTrace ( ) const
inline

Returns the last execution trace.

Definition at line 69 of file ExecutionTestPanel.h.

References m_lastTracer.

◆ GetTestSummary()

std::string Olympe::ExecutionTestPanel::GetTestSummary ( ) const

Returns a summary of the last test run.

Definition at line 119 of file ExecutionTestPanel.cpp.

References Olympe::GraphExecutionTracer::GetExecutionSummary(), and m_lastTracer.

+ Here is the call graph for this function:

◆ HasResults()

bool Olympe::ExecutionTestPanel::HasResults ( ) const
inline

Returns true if there are test results to display.

Definition at line 64 of file ExecutionTestPanel.h.

References m_lastTestErrors, and m_lastTestRun.

◆ Initialize()

void Olympe::ExecutionTestPanel::Initialize ( )

◆ IsVisible()

bool Olympe::ExecutionTestPanel::IsVisible ( ) const
inline

Definition at line 73 of file ExecutionTestPanel.h.

References m_visible.

◆ Render()

void Olympe::ExecutionTestPanel::Render ( )

Renders the test execution panel window.

Definition at line 42 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), m_visible, RenderErrors(), RenderSummary(), RenderTestControls(), and RenderTraceLog().

+ Here is the call graph for this function:

◆ RenderErrors()

void Olympe::ExecutionTestPanel::RenderErrors ( )
private

Definition at line 270 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), m_lastTestErrors, Olympe::BlueprintValidator::SeverityToColor(), and Olympe::BlueprintValidator::SeverityToString().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderExecutionEventRow()

void Olympe::ExecutionTestPanel::RenderExecutionEventRow ( const ExecutionEvent event,
size_t  rowIndex 
)
private

Definition at line 187 of file ExecutionTestPanel.cpp.

References Olympe::BranchTaken, Olympe::ConditionEvaluated, Olympe::DataPinResolved, Olympe::ErrorOccurred, Olympe::ExecutionBlocked, Olympe::ExecutionCompleted, GetComponentTypeID_Static(), Olympe::NodeEntered, and Olympe::NodeExited.

Referenced by RenderTraceLog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderSummary()

void Olympe::ExecutionTestPanel::RenderSummary ( )
private

Definition at line 329 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), Olympe::GraphExecutionTracer::GetExecutionSummary(), Olympe::GraphExecutionTracer::GetTraceLog(), and m_lastTracer.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderTestControls()

void Olympe::ExecutionTestPanel::RenderTestControls ( )
private

◆ RenderTraceLog()

void Olympe::ExecutionTestPanel::RenderTraceLog ( )
private

Definition at line 150 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), Olympe::GraphExecutionTracer::GetEvents(), m_lastTracer, and RenderExecutionEventRow().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RunExecutionTest()

std::vector< ValidationError > Olympe::ExecutionTestPanel::RunExecutionTest ( const TaskGraphTemplate tmpl)

Runs execution test on the specified template.

Parameters
tmplThe TaskGraphTemplate to test.
Returns
Vector of validation errors found during test.

Definition at line 87 of file ExecutionTestPanel.cpp.

References GetComponentTypeID_Static(), Olympe::GraphExecutionTracer::GetExecutionSummary(), m_lastTestErrors, m_lastTestRun, m_lastTracer, m_simulator, m_testOptions, Olympe::GraphExecutionTracer::Reset(), Olympe::GraphExecutionSimulator::SimulateExecution(), and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ SetVisible()

void Olympe::ExecutionTestPanel::SetVisible ( bool  v)
inline

Show / hide the panel.

Definition at line 72 of file ExecutionTestPanel.h.

References GetComponentTypeID_Static(), and m_visible.

+ Here is the call graph for this function:

◆ Shutdown()

void Olympe::ExecutionTestPanel::Shutdown ( )

Definition at line 37 of file ExecutionTestPanel.cpp.

References SYSTEM_LOG.

Member Data Documentation

◆ m_autoScroll

bool Olympe::ExecutionTestPanel::m_autoScroll = true
private

Definition at line 105 of file ExecutionTestPanel.h.

Referenced by RenderTestControls().

◆ m_lastTestErrors

std::vector<ValidationError> Olympe::ExecutionTestPanel::m_lastTestErrors
private

Definition at line 99 of file ExecutionTestPanel.h.

Referenced by DisplayTrace(), HasResults(), RenderErrors(), and RunExecutionTest().

◆ m_lastTestRun

bool Olympe::ExecutionTestPanel::m_lastTestRun = false
private

◆ m_lastTracer

GraphExecutionTracer Olympe::ExecutionTestPanel::m_lastTracer
private

◆ m_selectedEventIndex

int32_t Olympe::ExecutionTestPanel::m_selectedEventIndex = -1
private

Definition at line 102 of file ExecutionTestPanel.h.

◆ m_showErrors

bool Olympe::ExecutionTestPanel::m_showErrors = true
private

Definition at line 104 of file ExecutionTestPanel.h.

◆ m_showTraceLog

bool Olympe::ExecutionTestPanel::m_showTraceLog = true
private

Definition at line 103 of file ExecutionTestPanel.h.

◆ m_simulator

GraphExecutionSimulator Olympe::ExecutionTestPanel::m_simulator
private

Definition at line 97 of file ExecutionTestPanel.h.

Referenced by RunExecutionTest().

◆ m_testOptions

SimulationOptions Olympe::ExecutionTestPanel::m_testOptions
private

Definition at line 100 of file ExecutionTestPanel.h.

Referenced by Initialize(), RenderTestControls(), and RunExecutionTest().

◆ m_visible

bool Olympe::ExecutionTestPanel::m_visible = true
private

Definition at line 94 of file ExecutionTestPanel.h.

Referenced by IsVisible(), Render(), and SetVisible().


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