Crazy Eddies GUI System  0.7.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CEGUI::SubscriberSlot Class Reference

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

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 ()
 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 (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.