Manages the background thread and logic for running analysis workflows.
More...
#include <AnalysisRunner.hpp>
|
| void | joinPreviousThreadAsync () |
| | Asynchronously joins any running background thread to prevent blocking the UI.
|
| std::string | executeAnalysis () |
| | Executes the analysis workflow synchronously within the worker thread.
|
| void | handleAnalysisCompletion (const std::string &err) |
| | Updates the UI state and models once the analysis has completed.
|
Manages the background thread and logic for running analysis workflows.
◆ AnalysisRunner()
Constructs the AnalysisRunner with injected services.
- Parameters
-
| [in,out] | window | Reference to the UI window. |
| [in,out] | loader | Reference to the trajectory loader. |
| [in,out] | dispatcher | Reference to the analysis dispatcher. |
| [in,out] | options | Reference to program options. |
| [in,out] | controller | Reference to the main AppController. |
◆ ~AnalysisRunner()
| correlation::app::AnalysisRunner::~AnalysisRunner |
( |
| ) |
|
Destructor. Ensures analysis thread is joined.
◆ executeAnalysis()
| std::string correlation::app::AnalysisRunner::executeAnalysis |
( |
| ) |
|
|
nodiscardprivate |
Executes the analysis workflow synchronously within the worker thread.
- Returns
- Error message if analysis failed or was aborted, empty string otherwise.
◆ handleAnalysisCompletion()
| void correlation::app::AnalysisRunner::handleAnalysisCompletion |
( |
const std::string & | err | ) |
|
|
private |
Updates the UI state and models once the analysis has completed.
- Parameters
-
| [in] | err | Error message from execution, if any. |
◆ handleRunAnalysis()
| void correlation::app::AnalysisRunner::handleRunAnalysis |
( |
| ) |
|
Handles triggering the trajectory analysis execution.
◆ joinPreviousThreadAsync()
| void correlation::app::AnalysisRunner::joinPreviousThreadAsync |
( |
| ) |
|
|
private |
Asynchronously joins any running background thread to prevent blocking the UI.
◆ updateProgress()
| void correlation::app::AnalysisRunner::updateProgress |
( |
float | progress, |
|
|
const std::string & | msg ) |
Updates the UI progress indicator and status text.
- Parameters
-
| [in] | progress | Completion fraction [0.0 - 1.0]. |
| [in] | msg | Status update message string. |
◆ alive_
| std::shared_ptr<std::atomic<bool> > correlation::app::AnalysisRunner::alive_ |
|
private |
Initial value:{
std::make_shared<std::atomic<bool>>(true)}
Lifetime guard for queued UI callbacks.
◆ analysis_thread_
| std::jthread correlation::app::AnalysisRunner::analysis_thread_ |
|
private |
Handle for the background analysis computation.
◆ controller_
◆ dispatcher_
◆ loader_
◆ options_
◆ window_
| ::AppWindow& correlation::app::AnalysisRunner::window_ |
|
private |
The documentation for this class was generated from the following files: