FunctionSlot< R, ARGUMENTS > Class Template Reference

#include <Pt/Function.h>

Wraps Function objects so that they can act as slots.

Inherits BasicSlot< R, ARGUMENTS >.

Public Member Functions

 FunctionSlot (const Function< R, ARGUMENTS > &func)
 Constructs from callable.
 
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.