69 int run(
int argc,
char **argv);
155 template<
typename TController>
157 TController *controller = TController::template create_if_absent<TController>();
158 if (!controller->is_registered()) {
160 controller->mark_as_registered();
Defines the base App class that serves as the application core structure and the entry point.
Definition: App.hpp:45
virtual void app_setup()
Override to define your custom app setup that gets called after the engine_setup.
Definition: App.cpp:115
void draw()
Draws the frame. Calls engine::core::Controller::draw for registered controllers.
Definition: App.cpp:88
void terminate()
Terminates the app. Calls engine::core::Controller::terminate for registered controllers in the rever...
Definition: App.cpp:106
void initialize()
Initializes all the controllers registered in App::app_setup. Calls engine::core::Controller::initial...
Definition: App.cpp:47
int run(int argc, char **argv)
The main entry point into the App.
Definition: App.cpp:13
std::vector< Controller * > m_controllers
Definition: App.hpp:169
virtual void handle_error(const util::Error &)
Definition: App.cpp:119
virtual int on_exit()
Called right before the App exits.
Definition: App.hpp:140
void update()
Updates the app logic state. Calls engine::core::Controller::update for registered controllers.
Definition: App.cpp:80
void engine_setup(int argc, char **argv)
The first function that the engine calls to do its internal Controller classes engine_setup.
Definition: App.cpp:31
bool loop()
Checks whether the render loop should continue executing. Calls engine::core::Controller::loop for re...
Definition: App.cpp:63
TController * register_controller()
Registers the controller for execution. The Controller instance that the register_controller returns ...
Definition: App.hpp:156
void poll_events()
Processes all pending events. Calls engine::core::Controller::poll_events for registered controllers.
Definition: App.cpp:72
Controllers are a hook into the App main loop execution. By overriding virtual functions of this clas...
Definition: Controller.hpp:41
Base class for all errors.
Definition: Errors.hpp:22