Crazy Eddie's GUI System  0.8.7
CEGUI::SubscriberSlot Class Reference

SubscriberSlot class which is used when subscribing to events. More...

+ Inheritance diagram for CEGUI::SubscriberSlot:
+ Collaboration diagram for CEGUI::SubscriberSlot:

Public Member Functions

 SubscriberSlot ()
 Default constructor. Creates a SubscriberSlot with no bound slot.
 
 SubscriberSlot (FreeFunctionSlot::SlotFunction *func)
 Creates a SubscriberSlot that is bound to a free function.
 
 SubscriberSlot (FreeFunctionSlotVoid::SlotFunction *func)
 Creates a SubscriberSlot that is bound to a free function. More...
 
 SubscriberSlot (FreeFunctionSlotNoArgs::SlotFunction *func)
 Creates a SubscriberSlot that is bound to a free function. More...
 
 SubscriberSlot (FreeFunctionSlotVoidNoArgs::SlotFunction *func)
 Creates a SubscriberSlot that is bound to a free function. More...
 
 ~SubscriberSlot ()
 Destructor. Note this is non-virtual, which should be telling you not to sub-class!
 
bool operator() (const EventArgs &args) const
 Invokes the slot functor that is bound to this Subscriber. Returns whatever the slot returns, unless there is not slot bound when false is always returned.
 
bool connected () const
 Returns whether the SubscriberSlot is internally connected (bound).
 
void cleanup ()
 Disconnects the slot internally and performs any required cleanup operations.
 
template<typename T >
 SubscriberSlot (bool(T::*function)(const EventArgs &), T *obj)
 Creates a SubscriberSlot that is bound to a member function.
 
template<typename T >
 SubscriberSlot (void(T::*function)(const EventArgs &), T *obj)
 Creates a SubscriberSlot that is bound to a member function.
 
template<typename T >
 SubscriberSlot (bool(T::*function)(), T *obj)
 Creates a SubscriberSlot that is bound to a member function.
 
template<typename T >
 SubscriberSlot (void(T::*function)(), T *obj)
 Creates a SubscriberSlot that is bound to a member function.
 
template<typename T >
 SubscriberSlot (const FunctorReferenceBinder< T > &binder)
 Creates a SubscriberSlot that is bound to a functor object reference.
 
template<typename T >
 SubscriberSlot (const T &functor)
 Creates a SubscriberSlot that is bound to a copy of a functor object.
 
template<typename T >
 SubscriberSlot (T *functor)
 Creates a SubscriberSlot that is bound to a functor pointer.
 

Detailed Description

SubscriberSlot class which is used when subscribing to events.

For many uses, the construction of the SubscriberSlot may be implicit, so you do not have to specify Subscriber in your subscription calls. Notable exceptions are for subscribing member functions and references to functor objects.

Constructor & Destructor Documentation

CEGUI::SubscriberSlot::SubscriberSlot ( FreeFunctionSlotVoid::SlotFunction func)
inline

Creates a SubscriberSlot that is bound to a free function.

Note
The handler doesn't have to return bool. True is always returned.
CEGUI::SubscriberSlot::SubscriberSlot ( FreeFunctionSlotNoArgs::SlotFunction func)
inline

Creates a SubscriberSlot that is bound to a free function.

Note
The handler doesn't have to take EventArgs. EventArgs are ignored.
CEGUI::SubscriberSlot::SubscriberSlot ( FreeFunctionSlotVoidNoArgs::SlotFunction func)
inline

Creates a SubscriberSlot that is bound to a free function.

Note
The handler doesn't have to take EventArgs or return bool.