7 #ifndef __FWCOM_SLOT_HPP__ 8 #define __FWCOM_SLOT_HPP__ 10 #include "fwCom/SlotCall.hpp" 17 template<
typename F >
22 template<
typename R,
typename ... A >
26 typedef R SignatureType (A ...);
28 typedef SPTR ( SelfType ) sptr;
29 typedef WPTR ( SelfType ) wptr;
33 template<
typename F >
34 static SPTR(
Slot< R(A ...) > ) New( F f );
36 template<
typename F,
typename O >
37 static SPTR(
Slot< R(A ...) > ) New( F f, O o );
42 template<
typename R,
typename ... A >
43 class Slot<
std::function< R( A ... ) > > :
public Slot< R( A ... ) >
46 typedef R SignatureType (A ...);
47 typedef std::function< SignatureType > FunctionType;
49 template<
typename FUNCTOR >
62 virtual void run(A ...
a)
const 80 template<
typename R,
typename ... A >
81 class Slot<
Slot< R( A ... ) > > :
public Slot< std::function < R( A ... ) > >
85 typedef R SignatureType ( A ... );
86 typedef std::function< SignatureType > FunctionType;
88 template<
typename F >
91 template<
typename F >
94 template<
typename F >
100 template<
typename F,
typename ... Bindings>
101 SPTR(
Slot< typename ::fwCom::util::convert_function_type< F >::type > ) newSlot(F f, Bindings ... bindings);
virtual void run(A...a) const
Run the Slot with the given parameters.
Namespace containing fw4spl communication tools.
virtual R call(A...a) const
Call the Slot with the given parameters.