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
ApplicationOld.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#include <functional>
13
14namespace galaxy
15{
19 class App final
20 {
24 using LoopFunc = std::move_only_function<void(App* app)>;
25
26 public:
35 explicit App(const std::string& config_file = "config.json");
36
41
45 void load();
46
50 void run();
51
57 void set_update_func(LoopFunc&& update);
58
64 void set_render_func(LoopFunc&& render);
65
66 private:
70 App(const App&) = delete;
71
75 App(App&&) = delete;
76
80 App& operator=(const App&) = delete;
81
85 App& operator=(App&&) = delete;
86
89 void setup_config(std::string_view config_file);
91 void setup_fs();
94 void setup_nuklear();
95 void setup_loader();
96 void setup_meta();
99
100 private:
105
110 };
111} // namespace galaxy
112
113#endif
Base level class for any galaxy app.
App(const App &)=delete
Copy constructor.
void setup_config(std::string_view config_file)
void run()
Main game loop.
App(const std::string &config_file="config.json")
Default constructor.
void load()
Loads the default appdata file.
App & operator=(const App &)=delete
Copy assignment operator.
void setup_fs()
void setup_logging()
void set_render_func(LoopFunc &&render)
Use a custom rendering step in game loop.
void setup_async()
void setup_input()
void setup_rendering()
void setup_meta()
std::move_only_function< void(App *app)> LoopFunc
Defines a callback for update() or render() loops in app.run().
void set_update_func(LoopFunc &&update)
Use a custom update step in game loop.
void setup_services()
App & operator=(App &&)=delete
Move assignment operator.
void setup_scripting()
void setup_platform()
LoopFunc m_render
Render step in gameloop.
~App()
Destructor.
App(App &&)=delete
Move constructor.
LoopFunc m_update
Update step in gameloop.
Application.hpp galaxy.