|
|
PixelBullet
0.0.1
A C++ game engine
|
Main application class. More...
#include <Application.hpp>
Public Member Functions | |
| Application (const ApplicationSpecification &specification, const char *binaryPath) | |
| virtual | ~Application () |
| Application (const Application &)=delete | |
| Application & | operator= (const Application &)=delete |
| Application (Application &&)=delete | |
| Application & | operator= (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 ApplicationSpecification & | GetSpecification () const |
| Window & | GetWindow () |
| Graphics & | GetGraphics () |
| Audio & | GetAudio () |
| ResourceLocator & | GetResourceLocator () |
| 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 Application & | Get () |
Main application class.
Manages the application lifecycle, events, and layer stack.
|
explicit |
Constructs the application with a given specification.
| specification | Reference to the application specification. |
|
virtual |
Destroys the application.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
inlinestatic |
Gets the singleton application instance.
|
inline |
Retrieves the audio system.
|
inline |
Retrieves the graphics system.
|
inline |
Retrieves the resource locator.
|
inline |
Retrieves the application specification.
|
inline |
Retrieves the main application window.
| void PixelBullet::Application::OnEvent | ( | Event & | e | ) |
Handles an incoming event.
| e | Event to handle. |
|
delete |
Deleted move assignment operator.
|
delete |
Deleted copy assignment operator.
|
inline |
Pushes a layer onto the layer stack.
| layer | Unique pointer to the layer. |
|
inline |
Pushes an overlay onto the layer stack.
| layer | Unique pointer to the overlay layer. |
| void PixelBullet::Application::Restart | ( | const ApplicationSpecification & | newSpecification | ) |
Restarts the application with a new specification.
| newSpecification | New application specification. |
| void PixelBullet::Application::SubmitToMainThread | ( | std::function< void()> | function | ) |
Submits a function to the main thread queue for execution.
| function | Function to execute. |