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

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

#include <Application.hpp>

+ Collaboration diagram for galaxy::core::App:

Public Member Functions

 App (std::string_view log_dir, std::string_view config_file)
 Default constructor.
 
 ~App ()
 Destructor.
 
void load ()
 Loads the default appdata file.
 
void run ()
 Runs the app.
 

Private Member Functions

 App (const App &)=delete
 Copy constructor.
 
 App (App &&)=delete
 Move constructor.
 
Appoperator= (const App &)=delete
 Copy assignment operator.
 
Appoperator= (App &&)=delete
 Move assignment operator.
 
void setup_platform ()
 
void setup_logging (std::string_view log_dir)
 
void setup_async ()
 
void setup_config (std::string_view config_file)
 
void setup_fs ()
 
void setup_window ()
 
void setup_events ()
 
void setup_nuklear ()
 
void setup_loader ()
 
void setup_meta ()
 
void setup_scripting ()
 
void setup_services ()
 
void handle_events (sf::RenderWindow &window)
 

Private Attributes

std::optional< sf::Cursor > m_cursor
 SFML cursor handle. Needs to be kept in memory.
 

Detailed Description

Base level class for any galaxy app.

Definition at line 41 of file Application.hpp.

Constructor & Destructor Documentation

◆ App() [1/3]

galaxy::core::App::App ( std::string_view log_dir,
std::string_view config_file )
explicit

Default constructor.

Sets up the engine. You need to inherit this and call it from a subclass. Also calls std::srand(std::time(nullptr)) for you.

Parameters
log_dirSpecify the base directory to store log files.
config_fileFilepath of config file.

Definition at line 33 of file Application.cpp.

+ Here is the call graph for this function:

◆ ~App()

galaxy::core::App::~App ( )

Destructor.

Definition at line 59 of file Application.cpp.

◆ App() [2/3]

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

Copy constructor.

◆ App() [3/3]

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

Move constructor.

Member Function Documentation

◆ load()

void galaxy::core::App::load ( )

Loads the default appdata file.

Definition at line 75 of file Application.cpp.

+ Here is the call graph for this function:

◆ run()

void galaxy::core::App::run ( )

Runs the app.

Definition at line 83 of file Application.cpp.

+ Here is the call graph for this function:

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ setup_platform()

void galaxy::core::App::setup_platform ( )
private

Definition at line 152 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_logging()

void galaxy::core::App::setup_logging ( std::string_view log_dir)
private

Definition at line 161 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_async()

void galaxy::core::App::setup_async ( )
private

Definition at line 177 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_config()

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

Definition at line 190 of file Application.cpp.

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

◆ setup_fs()

void galaxy::core::App::setup_fs ( )
private

Definition at line 197 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_window()

void galaxy::core::App::setup_window ( )
private

Definition at line 202 of file Application.cpp.

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

◆ setup_events()

void galaxy::core::App::setup_events ( )
private

Definition at line 286 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_nuklear()

void galaxy::core::App::setup_nuklear ( )
private

Definition at line 298 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_loader()

void galaxy::core::App::setup_loader ( )
private

Definition at line 302 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_meta()

void galaxy::core::App::setup_meta ( )
private

Definition at line 307 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_scripting()

void galaxy::core::App::setup_scripting ( )
private

Definition at line 341 of file Application.cpp.

+ Here is the caller graph for this function:

◆ setup_services()

void galaxy::core::App::setup_services ( )
private

Definition at line 357 of file Application.cpp.

+ Here is the caller graph for this function:

◆ handle_events()

void galaxy::core::App::handle_events ( sf::RenderWindow & window)
private

Definition at line 375 of file Application.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_cursor

std::optional<sf::Cursor> galaxy::core::App::m_cursor
private

SFML cursor handle. Needs to be kept in memory.

Definition at line 110 of file Application.hpp.


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