AppEventHandler Class Reference

#include <appeventhandler.h>

Public Member Functions

 AppEventHandler (BaseApp &app)
virtual ~AppEventHandler ()=default
 AppEventHandler (AppEventHandler &)=delete
AppEventHandleroperator= (const AppEventHandler &)=delete
 AppEventHandler (AppEventHandler &&)=delete
AppEventHandleroperator= (AppEventHandler &&)=delete
virtual void start ()
virtual void process ()
virtual void shutdown ()
template<typename T >
T & getApp ()

Protected Attributes


Detailed Description

Helper object that allows for custom app processing behavior inside the AppRunner update loop. By default this object does nothing. Override the various methods to add process logic.

Inheritance diagram for AppEventHandler:
Collaboration diagram for AppEventHandler:

Constructor & Destructor Documentation

◆ AppEventHandler() [1/3]


appthe app this event handler works with when processing messages

◆ ~AppEventHandler()

virtual ~AppEventHandler ( )

◆ AppEventHandler() [2/3]

Copy is not allowed

◆ AppEventHandler() [3/3]

Move is not allowed

Member Function Documentation

◆ getApp()

T & getApp ( )

Returns the application as an object of type T

◆ operator=() [1/2]

AppEventHandler& operator= ( const AppEventHandler )

◆ operator=() [2/2]

AppEventHandler& operator= ( AppEventHandler &&  )

◆ process()

virtual void process ( )

This is called within the main loop of the app runner to specify specific event process behavior. For example, when working with a window you might want to check for window or input messages and forward those to the application This function is invoked at the beginning of the app loop

Reimplemented in GUIAppEventHandler, and SDLAppEventHandler.

◆ shutdown()

virtual void shutdown ( )

Called before shutting down all services and exiting the app

Reimplemented in GUIAppEventHandler, and SDLAppEventHandler.

◆ start()

virtual void start ( )

Called before running the app loop but after all services have been initialized Use this call to initialize functionality before starting the process loop

Reimplemented in GUIAppEventHandler, and SDLAppEventHandler.

Member Data Documentation

◆ mApp

BaseApp& mApp