3#include "Managers/AppManager.h"
4#include "Managers/ProjectManager.h"
5#include "Subsystems/Subsystem.h"
6#include "Widgets/Widget.h"
12 int Run(
int argc,
char** argv);
17 T* AddSubsystemClass();
20 T* GetSubsystemByClass();
22 AppManager* GetAppManager()
const {
return m_appManager.get(); }
23 ProjectManager* GetProjectManager()
const {
return m_projectManager.get(); }
25 void OpenProject(
const std::filesystem::path& projectFile);
28 std::vector<std::unique_ptr<Subsystem>> m_subsystems;
29 std::chrono::high_resolution_clock::time_point m_previousTime;
30 std::string m_executableLocation;
31 bool m_hasInit =
false;
32 bool m_isRequestingExit =
false;
34 std::unique_ptr<AppManager> m_appManager;
35 std::unique_ptr<ProjectManager> m_projectManager;
39T* App::AddSubsystemClass()
41 m_subsystems.push_back(std::make_unique<T>(
this));
42 T* subsystem =
dynamic_cast<T*
>(m_subsystems.back().get());
47 subsystem->PreInit(0, NULL);
55T* App::GetSubsystemByClass()
57 for (std::unique_ptr<Subsystem>& subsystem : m_subsystems)
59 if (T* castedSubsystem =
dynamic_cast<T*
>(subsystem.get()))
61 return castedSubsystem;
Definition AppManager.h:8
Definition ProjectManager.h:36