#include <boost/synapse/connect.hpp>
namespace boost { namespace synapse {
class connection;
template <class Signal,class Emitter,class F>
shared_ptr<connection> connect( Emitter * e, F f );
template <class Signal,class Emitter,class Receiver,class F>
shared_ptr<connection> connect( Emitter * e, Receiver * r, F f );
class pconnection;
template <class Signal,class Emitter,class F>
weak_ptr<pconnection> connect( <<Emitter>> e, F f ); (1)
template <class Signal,class Emitter,class Receiver,class F>
weak_ptr<pconnection> connect( <<Emitter>> e, <<Receiver>> r, F f ); (2)
shared_ptr<connection const> release( weak_ptr<pconnection const> const & c );
shared_ptr<connection> release( weak_ptr<pconnection> const & c );
namespace meta {
weak_ptr<void const> emitter();
namespace connect_flags {
unsigned const connecting=1;
unsigned const first_for_this_emitter=2;
unsigned const last_for_this_emitter=4;
}
template <class Signal>
struct connected {
typedef connected<Signal>(*type)( connection & c, unsigned connect_flags cf );
};
}
} }
-
Two overloads are provided:
<<Emitter>>
isweak_ptr<Emitter> const &
or, equivalently,shared_ptr<Emitter> const &
; -
Multple overloads are provided:
<<Emitter>>
isEmitter *
,weak_ptr<Emitter> const &
or, equivalently,shared_ptr<Emitter> const &
; at least one ofe
andr
is not a raw pointer.