|
Odamex
Setting the Standard in Multiplayer Doom
|
An event handler. More...
#include <event_handler.h>
Public Member Functions | |
| EventHandler (ODA_EventRegister *classPtr, EVENT_FUNC_PTR funcPtr) | |
| Constructor. | |
| ~EventHandler () | |
| Destructor. | |
| void | Trigger (AG_Event *event) |
| Trigger the event handler. | |
An event handler.
Class that wraps a pointer to a class and the event callback function pointer. The class can be cast and passed as a (void *) to C-based functions.
| agOdalaunch::EventHandler::EventHandler | ( | ODA_EventRegister * | classPtr, |
| EVENT_FUNC_PTR | funcPtr | ||
| ) | [inline] |
Constructor.
| classPtr | A pointer to an ODA_EventRegister derived class (often the 'this' pointer). |
| funcPtr | An ODA_EventRegister derived classes member function cast to EVENT_FUNC_PTR. This method can be public, protected, or private. |
| agOdalaunch::EventHandler::~EventHandler | ( | ) | [inline] |
Destructor.
| void agOdalaunch::EventHandler::Trigger | ( | AG_Event * | event | ) | [inline] |
Trigger the event handler.
This method will call into the member function that was provided at construction. This is typically called by the EventReceiver function.