40 #ifndef _eventsubscriberslot_cpp
41 #define _eventsubscriberslot_cpp
43 #include "eventsubscriberslot.h"
44 #include "eventsubscriber.h"
85 {
return EventSubscriberSlot::ST_Custom; }
112 {
return EventSubscriberSlot::ST_Functor; }
118 { this->
Functor->operator()(Args); }
138 {
return EventSubscriberSlot::ST_CFunction; }
151 SubscriberScript(SubScript)
164 {
return EventSubscriberSlot::ST_Script; }
CFunctionSubscriberSlot(Event *Ev, SubscriberFunction *Funct)
Class constructor.
virtual ~FunctorSubscriberSlot()
Class destructor.
Basic class definition for functors used by a FunctorSubscriberSlot.
FunctorEventSubscriber * Functor
A pointer to the functor to be called when the event is fired.
bool Boole
Generally acts a single bit, true or false.
virtual SlotType GetType() const
Gets the type of subscriber slot this is.
SubscriberFunction * Function
A pointer to the c-style function to be called when the event is fired.
Scripting::iScript * GetScript() const
Gets a pointer to the function used by this subscriber slot.
FunctorSubscriberSlot(Event *Ev, FunctorEventSubscriber *Funct, Boole CleanUpAfter)
Class constructor.
This class represents a given event that can be subscribed to and/or fired.
virtual void _NotifyEvent(EventArgumentsPtr Args)
Notifies this subscriber of an event being fired.
virtual void _NotifyEvent(EventArgumentsPtr Args)
Notifies this subscriber of an event being fired.
This is a base class for all classes that subscribe to events.
virtual SlotType GetType() const
Gets the type of subscriber slot this is.
virtual ~ScriptSubscriberSlot()
Class destructor.
SubscriberFunction * GetFunction() const
Gets a pointer to the function used by this subscriber slot.
A simple reference counting pointer.
Event * SubbedEvent
A pointer to the connected event.
Event * GetEvent() const
Gets the set of events the subscriber is subscribed to.
The interface for a script.
virtual ~EventSubscriberSlot()
Class destructor.
virtual ~CustomSubscriberSlot()
Class destructor.
void( SubscriberFunction)(EventArgumentsPtr Args)
This is a convenience typedef for a c-style method that accepts EventArguments.
virtual void _NotifyEvent(EventArgumentsPtr Args)=0
Notifies this subscriber of an event being fired.
CustomSubscriberSlot(Event *Ev, EventSubscriber *Sub)
Class constructor.
ScriptSubscriberSlot(Event *Ev, Scripting::iScript *SubScript)
Class constructor.
EventSubscriber * GetSubscriber() const
Gets a pointer to the subscriber used by this subscriber slot.
EventSubscriber * Subscriber
A pointer to the custom subscriber that the event will be passed on to.
virtual void _NotifyEvent(EventArgumentsPtr Args)
Notifies this subscriber of an event being fired.
This class represents a slot in an event that can be subscribed to via subscribers, functors, or methods.
Scripting::iScript * SubscriberScript
A pointer to the script to be executed when the event is fired.
EventSubscriberSlot(Event *Ev)
Class constructor.
The bulk of the engine components go in this namspace.
virtual SlotType GetType() const
Gets the type of subscriber slot this is.
FunctorEventSubscriber * GetFunctor() const
Gets a pointer to the functor used by this subscriber slot.
virtual SlotType GetType() const
Gets the type of subscriber slot this is.
SlotType
This enum is used to describe the type of SubscriberSlot an instance is, to be used for casting...
virtual void _NotifyEvent(EventArgumentsPtr Args)
Notifies this subscriber of an event being fired.
virtual ~CFunctionSubscriberSlot()
Class destructor.