PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
pixelbullet::Application Class Reference

Main application class. More...

#include <application.h>

Public Member Functions

 Application (ApplicationSpecification specification, const ApplicationBootstrap &bootstrap)
 
virtual ~Application ()
 
 Application (const Application &)=delete
 
Applicationoperator= (const Application &)=delete
 
 Application (Application &&)=delete
 
Applicationoperator= (Application &&)=delete
 
void OnEvent (Event &e)
 
template<typename T , typename... Args>
T * PushLayer (Args &&... args)
 
template<typename T , typename... Args>
T * PushOverlay (Args &&... args)
 
const ApplicationSpecificationGetSpecification () const
 
WindowGetWindow ()
 
GraphicsGetGraphics ()
 
AudioGetAudio ()
 
FilesystemGetFilesystem ()
 
const FilesystemGetFilesystem () const
 
ResourceCacheGetResourceCache ()
 
const ResourceCacheGetResourceCache () const
 
void Start () noexcept
 
void Stop () noexcept
 
bool IsRunning () const noexcept
 

Static Public Member Functions

static int Launch (const ApplicationBootstrap &bootstrap, ApplicationFactory factory)
 

Detailed Description

Main application class.

Manages the application lifecycle, events, and layer stack.

Constructor & Destructor Documentation

◆ Application() [1/3]

pixelbullet::Application::Application ( ApplicationSpecification specification,
const ApplicationBootstrap & bootstrap )
explicit

Constructs the application with a given specification.

Parameters
specificationReference to the application specification.

◆ ~Application()

pixelbullet::Application::~Application ( )
virtual

Destroys the application.

◆ Application() [2/3]

pixelbullet::Application::Application ( const Application & )
delete

Deleted copy constructor.

◆ Application() [3/3]

pixelbullet::Application::Application ( Application && )
delete

Deleted move constructor.

Member Function Documentation

◆ GetAudio()

Audio & pixelbullet::Application::GetAudio ( )
inline

Retrieves the audio system.

Returns
Reference to the Audio.

◆ GetGraphics()

Graphics & pixelbullet::Application::GetGraphics ( )
inline

Retrieves the graphics system.

Returns
Reference to the Graphics.

◆ GetSpecification()

const ApplicationSpecification & pixelbullet::Application::GetSpecification ( ) const
inline

Retrieves the application specification.

Returns
Constant reference to the application specification.

◆ GetWindow()

Window & pixelbullet::Application::GetWindow ( )
inline

Retrieves the main application window.

Returns
Reference to the Window.

◆ OnEvent()

void pixelbullet::Application::OnEvent ( Event & e)

Handles an incoming event.

Parameters
eEvent to handle.

◆ operator=() [1/2]

Application & pixelbullet::Application::operator= ( Application && )
delete

Deleted move assignment operator.

◆ operator=() [2/2]

Application & pixelbullet::Application::operator= ( const Application & )
delete

Deleted copy assignment operator.

◆ PushLayer()

template<typename T , typename... Args>
T * pixelbullet::Application::PushLayer ( Args &&... args)
inline

Pushes a layer onto the layer stack.

Parameters
layerUnique pointer to the layer.

◆ PushOverlay()

template<typename T , typename... Args>
T * pixelbullet::Application::PushOverlay ( Args &&... args)
inline

Pushes an overlay onto the layer stack.

Parameters
layerUnique pointer to the overlay layer.

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