Odamex
Setting the Standard in Multiplayer Doom
agOdalaunch::EventHandler Class Reference

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.

Detailed Description

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.


Constructor & Destructor Documentation

agOdalaunch::EventHandler::EventHandler ( ODA_EventRegister classPtr,
EVENT_FUNC_PTR  funcPtr 
) [inline]

Constructor.

Parameters:
classPtrA pointer to an ODA_EventRegister derived class (often the 'this' pointer).
funcPtrAn ODA_EventRegister derived classes member function cast to EVENT_FUNC_PTR. This method can be public, protected, or private.
agOdalaunch::EventHandler::~EventHandler ( ) [inline]

Destructor.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends