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

Main application class. More...

#include <Application.hpp>

Public Member Functions

 Application (const ApplicationSpecification &specification, const char *binaryPath)
 
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>
void PushLayer (Args &&... args)
 
template<typename T , typename... Args>
void PushOverlay (Args &&... args)
 
const ApplicationSpecificationGetSpecification () const
 
WindowGetWindow ()
 
GraphicsGetGraphics ()
 
AudioGetAudio ()
 
ResourceLocatorGetResourceLocator ()
 
bazel::tools::cpp::runfiles::Runfiles & GetRunfiles ()
 
void Start () noexcept
 
void Stop () noexcept
 
bool IsRunning () const noexcept
 
void Restart (const ApplicationSpecification &newSpecification)
 
void SubmitToMainThread (std::function< void()> function)
 

Static Public Member Functions

static ApplicationGet ()
 

Detailed Description

Main application class.

Manages the application lifecycle, events, and layer stack.

Constructor & Destructor Documentation

◆ Application() [1/3]

PixelBullet::Application::Application ( const ApplicationSpecification & specification,
const char * binaryPath )
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

◆ Get()

static Application & PixelBullet::Application::Get ( )
inlinestatic

Gets the singleton application instance.

Returns
Reference to the application instance.

◆ 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.

◆ GetResourceLocator()

ResourceLocator & PixelBullet::Application::GetResourceLocator ( )
inline

Retrieves the resource locator.

Returns
Reference to the ResourceLocator.

◆ 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>
void 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>
void PixelBullet::Application::PushOverlay ( Args &&... args)
inline

Pushes an overlay onto the layer stack.

Parameters
layerUnique pointer to the overlay layer.

◆ Restart()

void PixelBullet::Application::Restart ( const ApplicationSpecification & newSpecification)

Restarts the application with a new specification.

Parameters
newSpecificationNew application specification.

◆ SubmitToMainThread()

void PixelBullet::Application::SubmitToMainThread ( std::function< void()> function)

Submits a function to the main thread queue for execution.

Parameters
functionFunction to execute.

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