DelegateSlot< R, ARGUMENTS > Class Template Reference

#include <Pt/Delegate.h>

Wraps Delegate objects so that they can act as Slots. More...

Inherits BasicSlot< R, ARGUMENTS >.

Public Member Functions

 DelegateSlot (Delegate< R, ARGUMENTS > &delegate)
 Constructs from delegate.
 
virtual const void * callable () const
 Returns a pointer to the contained callable.
 
Slotclone () const
 Clone this object with new.
 
virtual bool equals (const Slot &slot) const
 Returns true if two slots are equal in value.
 
virtual void onConnect (const Connection &c)
 Notifies of connects.
 
virtual void onDisconnect (const Connection &c)
 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

template<typename R, typename ARGUMENTS>
class Pt::DelegateSlot< R, ARGUMENTS >

DelegateSlot is a "slot wrapper" for Delegate objects. That is, it effectively converts a Delegate object into a Slot object, so that it can be used as the target of another Delegate. This allows chaining of delegates.