Lugdunum
0.1.0
|
Class for application. More...
#include <Application.hpp>
Classes | |
struct | Info |
Public Member Functions | |
Application (const Info &info) | |
Application (const Application &)=delete | |
Application (Application &&)=delete | |
Application & | operator= (const Application &)=delete |
Application & | operator= (Application &&)=delete |
virtual | ~Application ()=default |
const Application::Info & | getInfo () const |
Gets the application's information. More... | |
lug::Graphics::Graphics & | getGraphics () |
Gets the lug::Graphics::Graphics component of the Application. More... | |
const lug::Graphics::Graphics & | getGraphics () const |
lug::Graphics::Render::Window * | getWindow () |
Gets the Window attached to the Application. More... | |
const lug::Graphics::Render::Window * | getWindow () const |
void | setRenderWindowInfo (lug::Graphics::Render::Window::InitInfo &initInfo) |
Sets the render window information. More... | |
const lug::Graphics::Render::Window::InitInfo & | getRenderWindowInfo () const |
Gets the render window information. More... | |
lug::Graphics::Render::Window::InitInfo & | getRenderWindowInfo () |
void | setGraphicsInfo (const lug::Graphics::Graphics::InitInfo &initInfo) |
Sets the graphics information. More... | |
const lug::Graphics::Graphics::InitInfo & | getGraphicsInfo () const |
Gets the graphics information. More... | |
lug::Graphics::Graphics::InitInfo & | getGraphicsInfo () |
bool | init (int argc, char *argv[]) |
Init the application with the informations filled in the lug::Graphics::Graphics::InitInfo and lug::Graphics::RenderWindow::InitInfo structures. More... | |
bool | beginInit (int argc, char *argv[]) |
Begin the initialization of the application with the informations filled in the lug::Graphics::Graphics::InitInfo structure. More... | |
bool | finishInit () |
Finish the initialization of the application with the informations filled in the lug::Graphics::RenderWindow::InitInfo structure. More... | |
bool | run () |
Run the application. More... | |
void | close () |
Close the application. More... | |
virtual void | onEvent (const lug::Window::Event &event)=0 |
Override this function to handle an event. More... | |
virtual void | onFrame (const System::Time &elapsedTime)=0 |
Override this function to handle a frame. More... | |
Protected Attributes | |
lug::Graphics::Graphics | _graphics |
Private Member Functions | |
bool | beginFrame (const lug::System::Time &elapsedTime) |
bool | endFrame () |
Private Attributes | |
Info | _info |
bool | _closed {false} |
lug::Graphics::Graphics::InitInfo | _graphicsInitInfo |
lug::Graphics::Render::Window::InitInfo | _renderWindowInitInfo |
lug::Graphics::Render::Window * | _window {nullptr} |
Class for application.
Root class of the Engine. The user has to inherit from this class and implement onFrame and onEvent.
Definition at line 20 of file Application.hpp.
|
explicit |
Definition at line 9 of file Application.cpp.
|
delete |
|
delete |
|
virtualdefault |
|
delete |
|
delete |
|
inline |
Gets the application's information.
Definition at line 1 of file Application.inl.
|
inline |
Gets the lug::Graphics::Graphics component of the Application.
Definition at line 5 of file Application.inl.
|
inline |
Definition at line 9 of file Application.inl.
|
inline |
Gets the Window attached to the Application.
Definition at line 14 of file Application.inl.
|
inline |
Definition at line 18 of file Application.inl.
|
inline |
Sets the render window information.
initInfo | The initialize information. |
Definition at line 22 of file Application.inl.
|
inline |
Gets the render window information.
Definition at line 26 of file Application.inl.
|
inline |
Definition at line 30 of file Application.inl.
|
inline |
Sets the graphics information.
[in] | initInfo | A reference to the RenderWindow initialize information. |
Definition at line 34 of file Application.inl.
|
inline |
Gets the graphics information.
Definition at line 38 of file Application.inl.
|
inline |
Definition at line 42 of file Application.inl.
bool lug::Core::Application::init | ( | int | argc, |
char * | argv[] | ||
) |
Init the application with the informations filled in the lug::Graphics::Graphics::InitInfo and lug::Graphics::RenderWindow::InitInfo structures.
The lug::Graphics::Graphics::InitInfo structure can be modified by calling getGraphicsInfo or setGraphicsInfo.
The lug::Graphics::RenderWindow::InitInfo structure can be modified by calling getRenderWindowInfo or setRenderWindowInfo.
[in] | argc | The argc argument as received from the main function. |
[in] | argv | The argv argument as received from the main function. |
Definition at line 11 of file Application.cpp.
bool lug::Core::Application::beginInit | ( | int | argc, |
char * | argv[] | ||
) |
Begin the initialization of the application with the informations filled in the lug::Graphics::Graphics::InitInfo structure.
The lug::Graphics::Graphics::InitInfo structure can be modified by calling getGraphicsInfo or setGraphicsInfo.
[in] | argc | The argc argument as received from the main function. |
[in] | argv | The argv argument as received from the main function. |
Definition at line 15 of file Application.cpp.
bool lug::Core::Application::finishInit | ( | ) |
Finish the initialization of the application with the informations filled in the lug::Graphics::RenderWindow::InitInfo structure.
The lug::Graphics::RenderWindow::InitInfo structure can be modified by calling getRenderWindowInfo or setRenderWindowInfo.
Definition at line 27 of file Application.cpp.
bool lug::Core::Application::run | ( | ) |
Run the application.
Launches an infinite loop (i.e. it does not exit immediately) and runs the application in the foreground.
Definition at line 41 of file Application.cpp.
void lug::Core::Application::close | ( | ) |
Close the application.
This can be called in onEvent or onFrame.
Definition at line 84 of file Application.cpp.
|
pure virtual |
Override this function to handle an event.
This function will be called by the engine for each polled event.
[in] | event | The event that was polled. |
|
pure virtual |
Override this function to handle a frame.
This function will be called by the engine at each frame.
|
private |
Definition at line 88 of file Application.cpp.
|
private |
Definition at line 92 of file Application.cpp.
|
private |
Definition at line 165 of file Application.hpp.
|
private |
Definition at line 166 of file Application.hpp.
|
private |
Definition at line 169 of file Application.hpp.
|
private |
Definition at line 182 of file Application.hpp.
|
private |
Definition at line 193 of file Application.hpp.
|
protected |
Definition at line 196 of file Application.hpp.