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
galaxy::App Class Referencefinal

Base level class for any galaxy app. More...

#include <Application.hpp>

Collaboration diagram for galaxy::App:

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.

Detailed Description

Base level class for any galaxy app.

Definition at line 22 of file Application.hpp.

Constructor & Destructor Documentation

◆ App() [1/3]

galaxy::App::App ( const std::string & config_file = "config.json")
explicit

Default constructor.

Constructs the engine, services, and loads resources.

Parameters
config_fileFilepath of config file.

Definition at line 49 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~App()

galaxy::App::~App ( )

Destructor.

Definition at line 71 of file Application.cpp.

◆ App() [2/3]

galaxy::App::App ( const App & )
privatedelete

Copy constructor.

Here is the call graph for this function:

◆ App() [3/3]

galaxy::App::App ( App && )
privatedelete

Move constructor.

Here is the call graph for this function:

Member Function Documentation

◆ load()

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.

Parameters
app_dataZlib + Base64 encoded json data file. Should have .galaxy extension.

Definition at line 92 of file Application.cpp.

Here is the call graph for this function:

◆ save()

void galaxy::App::save ( const std::string & app_data)

Save all active scenes and sub data within those scenes.

Parameters
app_dataFile to save data to.

Definition at line 136 of file Application.cpp.

Here is the call graph for this function:

◆ run()

void galaxy::App::run ( )

Main game loop.

Definition at line 172 of file Application.cpp.

Here is the call graph for this function:

◆ events()

SDL_Event & galaxy::App::events ( )
noexcept

Get event data.

Returns
SDL_Event data.

Definition at line 285 of file Application.cpp.

◆ operator=() [1/2]

App & galaxy::App::operator= ( const App & )
privatedelete

Copy assignment operator.

Here is the call graph for this function:

◆ operator=() [2/2]

App & galaxy::App::operator= ( App && )
privatedelete

Move assignment operator.

Here is the call graph for this function:

◆ setup_async()

void galaxy::App::setup_async ( )
private

Setup async module.

Definition at line 290 of file Application.cpp.

Here is the caller graph for this function:

◆ setup_config()

void galaxy::App::setup_config ( std::string_view config_file)
private

Setup config module.

Parameters
config_fileConfig file on disk, not VFS, to load.

Definition at line 309 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_logging()

void galaxy::App::setup_logging ( )
private

Setup logging module.

Definition at line 316 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_platform()

void galaxy::App::setup_platform ( )
private

Setup platform module.

Definition at line 336 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_fs()

void galaxy::App::setup_fs ( )
private

Setup filesystem module.

Definition at line 416 of file Application.cpp.

Here is the caller graph for this function:

◆ setup_rendering()

void galaxy::App::setup_rendering ( )
private

Setup graphics module.

Definition at line 421 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_input()

void galaxy::App::setup_input ( )
private

Setup input module.

Definition at line 483 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_factory()

void galaxy::App::setup_factory ( )
private

Setup factory module.

Definition at line 501 of file Application.cpp.

Here is the caller graph for this function:

◆ setup_services()

void galaxy::App::setup_services ( )
private

Setup services.

Definition at line 545 of file Application.cpp.

Here is the caller graph for this function:

◆ setup_ui()

void galaxy::App::setup_ui ( )
private

Setup ui module.

Definition at line 563 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_scripting()

void galaxy::App::setup_scripting ( )
private

Setup scripting module.

Definition at line 573 of file Application.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_events

SDL_Event galaxy::App::m_events
private

Core event data.

Definition at line 159 of file Application.hpp.

◆ m_editor

std::unique_ptr<Editor> galaxy::App::m_editor
private

Editor data.

Definition at line 164 of file Application.hpp.


The documentation for this class was generated from the following files: