Darc Library  2012.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
darc::EventHandler Class Reference

Event handler for function pointer management. More...

#include <dc_function.h>

List of all members.

Classes

class  TargetList

Public Member Functions

 EventHandler ()
virtual ~EventHandler ()
DCR connect (UInt _eID, IFunction *_pSlot)
 Connects this handler to a function with regard to a given event ID.
DCR ClearEvent (UInt _eID)
void disconnect (UInt _eID, IFunction *_pSlot)
DCR invoke (UInt _eID, void *_pValue)

Detailed Description

Event handler for function pointer management.

The class can be used to store external functions (via the IFunction interface) with regard to a specified event ID. When invoked, all functions that were assigned to a particular event ID are called. This mechanism is conceptually similar to signals and slots.


Constructor & Destructor Documentation

virtual darc::EventHandler::~EventHandler ( ) [inline, virtual]

Member Function Documentation

DCR darc::EventHandler::connect ( UInt  _eID,
IFunction _pSlot 
) [inline]

Connects this handler to a function with regard to a given event ID.

The ownership of the function pointer is passed to the handler. The object will be deleted if the connection cannot be applied, is disconnected or the handler is destroyed.

void darc::EventHandler::disconnect ( UInt  _eID,
IFunction _pSlot 
) [inline]
DCR darc::EventHandler::invoke ( UInt  _eID,
void *  _pValue 
) [inline]

Calls all functions for the specified event and passes the parameters.


The documentation for this class was generated from the following file: