Main application class for undoStudio.
More...
#include <Application.hpp>
|
| bool | initialize (int argc, char **argv) |
| | Initialize the application with command line arguments.
|
| |
| void | shutdown () |
| | Shutdown the application and release all resources.
|
| |
| bool | isRunning () const |
| | Check if the application is currently running.
|
| |
| int | run () |
| | Run the main application loop.
|
| |
| void | requestQuit () |
| | Request the application to quit gracefully.
|
| |
| template<typename T > |
| void | registerService (T *service) |
| | Register a service with the application.
|
| |
| template<typename T > |
| T * | getService () |
| | Get a registered service by type.
|
| |
Main application class for undoStudio.
The Application class is the central entry point for the undoStudio IDE. It manages initialization, the main event loop, and shutdown procedures. It also provides a service locator pattern for accessing various services.
◆ Application() [1/2]
| undoStudio::core::Application::Application |
( |
| ) |
|
|
privatedefault |
◆ ~Application()
| undoStudio::core::Application::~Application |
( |
| ) |
|
|
privatedefault |
◆ Application() [2/2]
| undoStudio::core::Application::Application |
( |
const Application & |
| ) |
|
|
privatedelete |
◆ getInstance()
| Application & undoStudio::core::Application::getInstance |
( |
| ) |
|
|
static |
◆ getService()
template<typename T >
| T * undoStudio::core::Application::getService |
( |
| ) |
|
|
inline |
Get a registered service by type.
- Template Parameters
-
- Returns
- Pointer to the service instance, or nullptr if not found
◆ initialize()
| bool undoStudio::core::Application::initialize |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Initialize the application with command line arguments.
- Parameters
-
| argc | Number of command line arguments |
| argv | Array of command line argument strings |
- Returns
- true if initialization succeeded, false otherwise
◆ isRunning()
| bool undoStudio::core::Application::isRunning |
( |
| ) |
const |
Check if the application is currently running.
- Returns
- true if the application is running, false otherwise
◆ operator=()
◆ registerService()
template<typename T >
| void undoStudio::core::Application::registerService |
( |
T * |
service | ) |
|
|
inline |
Register a service with the application.
- Template Parameters
-
- Parameters
-
| service | Instance of the service |
◆ requestQuit()
| void undoStudio::core::Application::requestQuit |
( |
| ) |
|
Request the application to quit gracefully.
This method signals the main loop to exit after completing the current iteration.
◆ run()
| int undoStudio::core::Application::run |
( |
| ) |
|
Run the main application loop.
- Returns
- Exit code (0 for success, non-zero for errors)
◆ shutdown()
| void undoStudio::core::Application::shutdown |
( |
| ) |
|
Shutdown the application and release all resources.
This method properly cleans up all services and releases any allocated resources before application termination.
◆ m_isRunning
| bool undoStudio::core::Application::m_isRunning = false |
|
private |
◆ m_quitRequested
| bool undoStudio::core::Application::m_quitRequested = false |
|
private |
◆ m_services
| std::unordered_map<std::type_index, void*> undoStudio::core::Application::m_services |
|
private |
The documentation for this class was generated from the following files: