DSC Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DSC::Event Class Reference

Class responsible with event registration and execution. More...

#include <event.hpp>

Public Member Functions

 Event ()
 Creates a new Event instance.
 
Eventoperator+= (const StaticEventHandler &e)
 Adds a new event handler to this event. More...
 
Eventoperator-= (const StaticEventHandler &e)
 Removes an event handler from this event. More...
 
template<class C >
void add_event (const NonStaticEventHandler< C > e, C *instance)
 
template<class C >
void remove_event (const NonStaticEventHandler< C > e, C *instance)
 
void trigger (void *sender, void *args) const
 Fires the event. More...
 

Detailed Description

Class responsible with event registration and execution.

Member Function Documentation

◆ operator+=()

Event & DSC::Event::operator+= ( const StaticEventHandler e)

Adds a new event handler to this event.

Parameters
[in]eevent handler
Returns
this Event instance

◆ operator-=()

Event & DSC::Event::operator-= ( const StaticEventHandler e)

Removes an event handler from this event.

Parameters
[in]eevent handler
Returns
this Event instance

◆ trigger()

void DSC::Event::trigger ( void *  sender,
void *  args 
) const

Fires the event.

Parameters
[in]senderthe object which fires the event
[in]eventargs (can be anything)

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