SignalSlot< As > Class Template Reference

#include <Pt/Signal.h>

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

Inherits BasicSlot< void, As... >.

Public Member Functions

 SignalSlot (Signal< As... > &signal)
 Constructs from signal.
Slotclone () const
 Clone this object with new.
virtual const Callback * callable () const
 Returns the callable converted to the type-erased Callback interface.
virtual void onConnect (const Connection &c)
 Notifies of connects.
virtual void onDisconnect (const Connection &c)
 Notifies of disconnects.
virtual bool equals (const Slot &rhs) const
 Returns true if two slots are equal in value.

(Note that these are not member symbols.)

ConstMethodSlot< void, ClassT, As... > slot (ClassT &object, void(BaseT::*method)(As...) const)
 Returns a slot object for the given object/member pair.
DelegateSlot< void, As... > slot (Delegate< void, As... > &delegate)
 Returns a slot object for the given delegate.
FunctionSlot< void, As... > slot (void(*function)(As...))
 Returns a slot object for the given free/static function.
SlotT slot (L &&lambda)
 Returns a deduced slot object for the given lambda.
SlotT slot (Connectable &context, L &&lambda)
 Returns a deduced slot object for the given lambda.
LambdaSlot< L, void, A... > slot (T &&lambda)
 Returns a slot object for the given lambda.
LambdaSlot< L, void, A... > slot (Connectable &context, T &&lambda)
 Returns a slot object for the given lambda.
MethodSlot< void, ClassT, As... > slot (ClassT &object, void(BaseT::*method)(As...))
 Returns a slot object for the given object/member pair.
SignalSlot< As... > slot (Signal< As... > &signal)
 Returns a slot object for the given signal.
template<typename R, typename BaseT, typename ClassT, typename... As>
ConstMethodSlot< R, ClassT, As... > slot (ClassT &object, R(BaseT::*method)(As...) const)
 Returns a slot object for the given object/member pair.
template<typename R, typename... As>
DelegateSlot< R, As... > slot (Delegate< R, As... > &delegate)
 Returns a slot object for the given delegate.
template<typename R, typename... As>
FunctionSlot< R, As... > slot (R(*function)(As...))
 Returns a slot object for the given free/static function.

Detailed Description

template<typename... As>
class Pt::SignalSlot< As >

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

Member Function Documentation

◆ callable()

template<typename... As>
virtual const Callback * callable ( ) const
virtual

The concrete slot returns its stored callable converted to Callback via a derived-to-base conversion. Callers downcast the result to Callable<R, As...> or Invokable<As...> to invoke it.

Implements Slot.