1 #ifndef _SDLWRAP_EVENTHANDLER_H_
2 #define _SDLWRAP_EVENTHANDLER_H_
8 /* This class takes care of all events, reading them, handling them etc. The plan is to have the game singleton inherit
9 * from this class so all actual event handling is taken care by the derived class. This class simply acts as a wrapper
10 * around the SDL_PollEvent() function and all the On* functions that detect and handle the individual unique events.
11 * Since I don't know what they'll be doing yet, the plan is to declare all On* functions that I need as pure virtual
12 * functions. This class won't be using any of them, it's all up to the singleton.
17 /* Empty constructor and destructor... */
21 /* This function is responsible for handling all calls to the On*() functions. Since they're all virtual for
22 * now, it's not like it's gonna be doing much, but once the singleton overrides the pure virtual functions
23 * then it can take control of any through this function. Well, more like this function will call the On*()
24 * functions, which are all defined by the singleton.
28 /* Just a cheap wrapper around SDL_PollEvent. Just doing it to not type SDL_ :P */
31 /* And... the virtuals :P Pretty much self explanatory as well. */
32 /* Actually wait, seems I misunderstood pure virtual and virtual functions. If it's just simply virtual, like
33 * what I'm doing here with my On*() functions, then they may be overridden, but pure virtual functions MUST be
34 * overridden, which is not what I'm looking for...
36 virtual void OnQuit() {};