69 int run(
int argc,
char **argv);
159 template<
typename TController>
161 TController *controller = TController::template create_if_absent<TController>();
162 if (!controller->is_registered()) {
164 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 engine engine_setup.
Definition App.cpp:115
void draw()
Draws the frame. Calls engine::Controller::draw for registered controllers.
Definition App.cpp:88
void terminate()
Terminates the app. Calls engine::Controller::terminate for registered controllers in the reverse ord...
Definition App.cpp:106
void initialize()
Initializes all the controllers registered in App::user_setup. Calls engine::Controller::initialize f...
Definition App.cpp:47
int run(int argc, char **argv)
The main entry point into the App.
Definition App.cpp:13
TController * register_controller()
Registers the controller for execution. The Controller instance that the register_controller returns ...
Definition App.hpp:160
std::vector< Controller * > m_controllers
Definition App.hpp:173
virtual void handle_error(const util::Error &)
Definition App.cpp:119
virtual int on_exit()
Called right before the App exits.
Definition App.hpp:144
void update()
Updates the app logic state. Calls engine::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::Controller::loop for register...
Definition App.cpp:63
void poll_events()
Processes all pending events. Calls engine::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:42
Base class for all errors.
Definition Errors.hpp:22