|
pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
|
Orchestrates the application's lifecycle: setup, execution, and cleanup. More...
#include <app_manager.hpp>


Public Member Functions | |
| AppManager () | |
| Constructs the application manager and sets application-wide metadata. More... | |
| bool | setup () |
| Sets up all application components before running. More... | |
| int | run () |
| Runs the main application event loop. More... | |
Private Slots | |
| void | cleanup () |
| Performs cleanup after the event loop has finished. More... | |
Private Attributes | |
| std::unique_ptr< AppUtils::Logger > | logger_ |
| The logger for the application. More... | |
| std::unique_ptr< CmdLine::CmdLineArgs > | args_ |
| The command line arguments for the application. More... | |
| std::unique_ptr< Window::QmlBridge > | bridge_ |
| The QML bridge for exposing C++ functionality. More... | |
| QMainWindow * | mainWindow_ |
| The main window (stored for proper cleanup order). More... | |
Orchestrates the application's lifecycle: setup, execution, and cleanup.
This class encapsulates the initialisation of translations, argument parsing, logging, and the QML interface, simplifying the global main() function.
Definition at line 25 of file app_manager.hpp.
| App::AppManager::AppManager | ( | ) |
Constructs the application manager and sets application-wide metadata.
Definition at line 26 of file app_manager.cpp.
|
privateslot |
Performs cleanup after the event loop has finished.
According to Qt best practices, we should let QApplication handle widget destruction automatically. However, QWindowContainer has a special requirement: the QWindow (Display) must still be valid when the container is destroyed. Therefore, we must destroy the container explicitly BEFORE QmlBridge (which owns Display) is destroyed.
Definition at line 153 of file app_manager.cpp.


| int App::AppManager::run | ( | ) |
Runs the main application event loop.
Definition at line 73 of file app_manager.cpp.

| bool App::AppManager::setup | ( | ) |
Sets up all application components before running.
Definition at line 39 of file app_manager.cpp.


|
private |
The command line arguments for the application.
Definition at line 54 of file app_manager.hpp.
|
private |
The QML bridge for exposing C++ functionality.
Definition at line 56 of file app_manager.hpp.
|
private |
The logger for the application.
Definition at line 52 of file app_manager.hpp.
|
private |
The main window (stored for proper cleanup order).
Definition at line 58 of file app_manager.hpp.