Slot Class Referenceabstract

#include <Pt/Slot.h>

Endpoint of a signal/slot connection. More...

Inherited by BasicSlot< R, ARGUMENTS >, and BasicSlot< R, ARGUMENTS >.

Public Member Functions

virtual ~Slot ()
 Destructor.
 
virtual const void * callable () const =0
 Returns a pointer to the contained callable.
 
virtual Slotclone () const =0
 Clone this object with new.
 
virtual bool equals (const Slot &slot) const =0
 Returns true if two slots are equal in value.
 
virtual void onConnect (const Connection &c)=0
 Notifies of connects.
 
virtual void onDisconnect (const Connection &c)=0
 Notifies of disconnects.
 

Related Functions

template<class R , class BaseT , class ClassT , typename ARGS >
MethodSlot< R, ClassT, ARGS > slot (ClassT &obj, R(BaseT::*memFunc)(ARGS))
 Returns a slot object for the given object/member pair.
 
template<class R , class BaseT , class C , typename ARGS >
ConstMethodSlot< R, C, ARGS > slot (C &obj, R(BaseT::*memFunc)(ARGS) const )
 Returns a slot object for the given object/member pair.
 
template<typename R , typename ARGS >
FunctionSlot< R, ARGS > slot (R(*func)(ARGS))
 Returns a slot object for the given free/static function.
 

Detailed Description

Slots can be constructed with the slot() function, which is overloaded for various types of callable entities, most notably functions or member functions. Slots are lightweight proxy-objects and one example is the Pt::MethodSlot, which allows to use a member function as a slot.