Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::EventSubscriberSlot Class Referenceabstract

This class represents a slot in an event that can be subscribed to via subscribers, functors, or methods. More...

#include <eventsubscriberslot.h>

+ Inheritance diagram for Mezzanine::EventSubscriberSlot:
+ Collaboration diagram for Mezzanine::EventSubscriberSlot:

Public Types

enum  SlotType {
  ST_Custom = 1, ST_Functor = 2, ST_CFunction = 3, ST_Script = 4,
  ST_MemberFunction = 5
}
 This enum is used to describe the type of SubscriberSlot an instance is, to be used for casting.
 

Public Member Functions

 EventSubscriberSlot (Event *Ev)
 Class constructor. More...
 
virtual ~EventSubscriberSlot ()
 Class destructor.
 
virtual void _NotifyEvent (EventArgumentsPtr Args)=0
 Notifies this subscriber of an event being fired. More...
 
EventGetEvent () const
 Gets the set of events the subscriber is subscribed to. More...
 
virtual SlotType GetType () const =0
 Gets the type of subscriber slot this is. More...
 

Protected Attributes

EventSubbedEvent
 A pointer to the connected event. More...
 

Detailed Description

This class represents a slot in an event that can be subscribed to via subscribers, functors, or methods.

Definition at line 57 of file eventsubscriberslot.h.

Constructor & Destructor Documentation

Mezzanine::EventSubscriberSlot::EventSubscriberSlot ( Event Ev)

Class constructor.

Parameters
EvThe event this subscriber slot belongs to.

Definition at line 51 of file eventsubscriberslot.cpp.

Member Function Documentation

virtual void Mezzanine::EventSubscriberSlot::_NotifyEvent ( EventArgumentsPtr  Args)
pure virtual

Notifies this subscriber of an event being fired.

Parameters
ArgsThe arguments containing specific information regarding this event.

Implemented in Mezzanine::ScriptSubscriberSlot, Mezzanine::CFunctionSubscriberSlot, Mezzanine::FunctorSubscriberSlot, and Mezzanine::CustomSubscriberSlot.

Event * Mezzanine::EventSubscriberSlot::GetEvent ( ) const

Gets the set of events the subscriber is subscribed to.

Returns
Returns a reference to the set of events this is subscribed to.

Definition at line 61 of file eventsubscriberslot.cpp.

virtual SlotType Mezzanine::EventSubscriberSlot::GetType ( ) const
pure virtual

Gets the type of subscriber slot this is.

Returns
Returns a SlotType enum value representing the type of subscriber slot this is.

Implemented in Mezzanine::ScriptSubscriberSlot, Mezzanine::CFunctionSubscriberSlot, Mezzanine::FunctorSubscriberSlot, and Mezzanine::CustomSubscriberSlot.

Member Data Documentation

Event* Mezzanine::EventSubscriberSlot::SubbedEvent
protected

A pointer to the connected event.

Definition at line 72 of file eventsubscriberslot.h.


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