galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Application.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_CORE_APPLICATION_HPP_
9#define GALAXY_CORE_APPLICATION_HPP_
10
11#include <string>
12
13#include <SDL3/SDL_events.h>
14
15namespace galaxy
16{
17 class Editor;
18
22 class App final
23 {
24 public:
32 explicit App(const std::string& config_file = "config.json");
33
37 ~App();
38
46 void load(const std::string& app_data = "base.galaxy");
47
53 void save(const std::string& app_data);
54
58 void run();
59
65 SDL_Event& events() noexcept;
66
67 private:
71 App(const App&) = delete;
72
76 App(App&&) = delete;
77
81 App& operator=(const App&) = delete;
82
86 App& operator=(App&&) = delete;
87
91 void setup_async();
92
98 void setup_config(std::string_view config_file);
99
103 void setup_logging();
104
108 void setup_platform();
109
113 void setup_fs();
114
118 void setup_rendering();
119
123 void setup_input();
124
128 void setup_factory();
129
133 // void setup_loader();
134
138 // void setup_meta();
139
143 void setup_services();
144
148 void setup_ui();
149
153 void setup_scripting();
154
155 private:
159 SDL_Event m_events;
160
164 std::unique_ptr<Editor> m_editor;
165 };
166} // namespace galaxy
167
168#endif
App(const App &)=delete
Copy constructor.
void setup_config(std::string_view config_file)
Setup config module.
void run()
Main game loop.
SDL_Event & events() noexcept
Get event data.
App(const std::string &config_file="config.json")
Default constructor.
void save(const std::string &app_data)
Save all active scenes and sub data within those scenes.
App & operator=(const App &)=delete
Copy assignment operator.
void setup_fs()
Setup filesystem module.
SDL_Event m_events
Core event data.
void setup_logging()
Setup logging module.
void setup_ui()
Setup ui module.
void setup_async()
Setup async module.
void setup_input()
Setup input module.
void setup_factory()
Setup factory module.
void setup_rendering()
Setup graphics module.
std::unique_ptr< Editor > m_editor
Editor data.
void load(const std::string &app_data="base.galaxy")
Load app data file into scene manager.
void setup_services()
Setup services.
App & operator=(App &&)=delete
Move assignment operator.
void setup_scripting()
Setup scripting module.
void setup_platform()
Setup platform module.
App(App &&)=delete
Move constructor.
Ingame debug editor UI.
Definition Editor.hpp:23
Tag.cpp galaxy.
Definition Tag.cpp:13