22 #ifndef __pbd_signals_h__
23 #define __pbd_signals_h__
36 #include <glibmm/threads.h>
38 #include <boost/noncopyable.hpp>
39 #include <boost/bind.hpp>
40 #include <boost/bind/protect.hpp>
41 #include <boost/function.hpp>
42 #include <boost/enable_shared_from_this.hpp>
43 #include <boost/optional.hpp>
49 #define DEBUG_PBD_SIGNAL_CONNECTIONS
52 #ifdef DEBUG_PBD_SIGNAL_CONNECTIONS
67 , _debug_connection (false)
71 virtual void disconnect (std::shared_ptr<Connection>) = 0;
72 #ifdef DEBUG_PBD_SIGNAL_CONNECTIONS
79 #ifdef DEBUG_PBD_SIGNAL_CONNECTIONS
89 , _invalidation_record (ir)
91 if (_invalidation_record) {
92 _invalidation_record->ref ();
99 SignalBase* signal = _signal.exchange (0, std::memory_order_acq_rel);
114 if (_invalidation_record) {
115 _invalidation_record->unref ();
122 if (!_signal.exchange (0, std::memory_order_acq_rel)) {
132 if (_invalidation_record) {
133 _invalidation_record->unref ();
149 template <
typename Iter>
152 while (first != last) {
226 #include "pbd/signals_generated.h"
std::atomic< SignalBase * > _signal
Glib::Threads::Mutex _mutex
PBD::EventLoop::InvalidationRecord * _invalidation_record
Connection(SignalBase *b, PBD::EventLoop::InvalidationRecord *ir)
result_type operator()(Iter first, Iter last) const
boost::optional< R > result_type
Glib::Threads::Mutex _scoped_connection_lock
void add_connection(const UnscopedConnection &c)
ConnectionList _scoped_connection_list
ScopedConnectionList(const ScopedConnectionList &)
std::list< ScopedConnection * > ConnectionList
virtual ~ScopedConnectionList()
ScopedConnection(UnscopedConnection c)
UnscopedConnection const & the_connection() const
std::atomic< bool > _in_dtor
virtual void disconnect(std::shared_ptr< Connection >)=0
void set_debug_connection(bool yn)
Glib::Threads::Mutex _mutex
std::shared_ptr< Connection > UnscopedConnection
#define DEBUG_PBD_SIGNAL_CONNECTIONS