SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::core::Application Class Referencefinal

A class representing a SPARK application. More...

#include <Application.h>

Classes

struct  Registries
 A struct containing all the registries for the application. More...
 
struct  Settings
 A struct containing the settings for the application. More...
 

Public Member Functions

 Application (const Application &other)=delete
 
 Application (Application &&other) noexcept=default
 
Applicationoperator= (const Application &other)=delete
 
Applicationoperator= (Application &&other) noexcept=default
 
void run ()
 Runs the application.
 
void close ()
 Closes the application.
 
Settings settings () const
 Gets the settings for the application.
 
Windowwindow ()
 Gets the window for the application.
 
void setScene (std::shared_ptr< core::Scene > scene)
 Sets the scene to render.
 
core::Scenescene ()
 Gets the scene to render.
 
Registriesregistries ()
 Gets a reference to the registries for the application.
 

Static Public Member Functions

static ApplicationInstance ()
 Gets the instance of the application.
 

Friends

class SceneManager
 
template<typename... Tags>
class ApplicationBuilder
 

Detailed Description

A class representing a SPARK application.

Member Function Documentation

◆ Instance()

Application * spark::core::Application::Instance ( )
static

Gets the instance of the application.

Returns
A pointer to the instance of the application singleton.

◆ registries()

Application::Registries & spark::core::Application::registries ( )
nodiscard

Gets a reference to the registries for the application.

Returns
A Registries struct containing all the registries for the application.

◆ scene()

core::Scene & spark::core::Application::scene ( )
nodiscard

Gets the scene to render.

Returns
A spark::core::Scene to render.

◆ setScene()

void spark::core::Application::setScene ( std::shared_ptr< core::Scene > scene)

Sets the scene to render.

Parameters
sceneA shared pointer to the spark::core::Scene to render.

◆ settings()

Application::Settings spark::core::Application::settings ( ) const
nodiscard

Gets the settings for the application.

Returns
A spark::core::Application::Settings struct containing the settings for the application.

◆ window()

Window & spark::core::Application::window ( )
nodiscard

Gets the window for the application.

Returns
A reference to the spark::core::Window for the application.