Base level class for any galaxy app. More...
#include <Application.hpp>
Public Member Functions | |
| App (const std::string &config_file="config.json") | |
| Default constructor. | |
| ~App () | |
| Destructor. | |
| void | load (const std::string &app_data="base.galaxy") |
| Load app data file into scene manager. | |
| void | save (const std::string &app_data) |
| Save all active scenes and sub data within those scenes. | |
| void | run () |
| Main game loop. | |
| SDL_Event & | events () noexcept |
| Get event data. | |
Private Member Functions | |
| App (const App &)=delete | |
| Copy constructor. | |
| App (App &&)=delete | |
| Move constructor. | |
| App & | operator= (const App &)=delete |
| Copy assignment operator. | |
| App & | operator= (App &&)=delete |
| Move assignment operator. | |
| void | setup_async () |
| Setup async module. | |
| void | setup_config (std::string_view config_file) |
| Setup config module. | |
| void | setup_logging () |
| Setup logging module. | |
| void | setup_platform () |
| Setup platform module. | |
| void | setup_fs () |
| Setup filesystem module. | |
| void | setup_rendering () |
| Setup graphics module. | |
| void | setup_input () |
| Setup input module. | |
| void | setup_factory () |
| Setup factory module. | |
| void | setup_services () |
| Setup services. | |
| void | setup_ui () |
| Setup ui module. | |
| void | setup_scripting () |
| Setup scripting module. | |
Private Attributes | |
| SDL_Event | m_events |
| Core event data. | |
| std::unique_ptr< Editor > | m_editor |
| Editor data. | |
Base level class for any galaxy app.
Definition at line 22 of file Application.hpp.
|
explicit |
Default constructor.
Constructs the engine, services, and loads resources.
| config_file | Filepath of config file. |
Definition at line 49 of file Application.cpp.
| galaxy::App::~App | ( | ) |
Destructor.
Definition at line 71 of file Application.cpp.
|
privatedelete |
Copy constructor.
|
privatedelete |
Move constructor.
| void galaxy::App::load | ( | const std::string & | app_data = "base.galaxy" | ) |
Load app data file into scene manager.
Will remove any other loaded scenes and adjust the currently loaded scene.
| app_data | Zlib + Base64 encoded json data file. Should have .galaxy extension. |
Definition at line 92 of file Application.cpp.
| void galaxy::App::save | ( | const std::string & | app_data | ) |
Save all active scenes and sub data within those scenes.
| app_data | File to save data to. |
Definition at line 136 of file Application.cpp.
| void galaxy::App::run | ( | ) |
Main game loop.
Definition at line 172 of file Application.cpp.
|
noexcept |
Copy assignment operator.
Move assignment operator.
|
private |
Setup async module.
Definition at line 290 of file Application.cpp.
|
private |
Setup config module.
| config_file | Config file on disk, not VFS, to load. |
Definition at line 309 of file Application.cpp.
|
private |
Setup logging module.
Definition at line 316 of file Application.cpp.
|
private |
Setup platform module.
Definition at line 336 of file Application.cpp.
|
private |
Setup filesystem module.
Definition at line 416 of file Application.cpp.
|
private |
Setup graphics module.
Definition at line 421 of file Application.cpp.
|
private |
Setup input module.
Definition at line 483 of file Application.cpp.
|
private |
Setup factory module.
Definition at line 501 of file Application.cpp.
|
private |
Setup services.
Definition at line 545 of file Application.cpp.
|
private |
Setup ui module.
Definition at line 563 of file Application.cpp.
|
private |
Setup scripting module.
Definition at line 573 of file Application.cpp.
|
private |
Core event data.
Definition at line 159 of file Application.hpp.
|
private |
Editor data.
Definition at line 164 of file Application.hpp.