fw4spl
SlotConnectionBase.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 #ifndef __FWCOM_SLOTCONNECTIONBASE_HPP__
7 #define __FWCOM_SLOTCONNECTIONBASE_HPP__
8 
9 #include <fwCore/BaseObject.hpp>
10 
11 #include "fwCom/config.hpp"
12 
13 namespace fwCom
14 {
15 
21 {
25  typedef std::shared_ptr< SlotConnectionBase > sptr;
26  typedef std::shared_ptr< SlotConnectionBase const > csptr;
27  typedef std::weak_ptr< SlotConnectionBase > wptr;
28  typedef std::weak_ptr< SlotConnectionBase const > cwptr;
29 
30  typedef std::shared_ptr< void > BlockerSptrType;
31  typedef std::weak_ptr< void > BlockerWptrType;
35  {
36  }
37 
39  virtual void disconnect() = 0;
40 
42  virtual BlockerSptrType getBlocker() = 0;
43 
44  protected:
45 
48 
51 
55  template < typename F >
56  friend struct Signal;
59  virtual void disconnectWeakLock() = 0;
61 
62 
64  virtual void connectNoLock() = 0;
65 };
66 
67 } // namespace fwCom
68 
69 #endif /* __FWCOM_SLOTCONNECTIONBASE_HPP__ */
70 
SlotConnectionBase & operator=(const SlotConnectionBase &)
Copy operator forbidden.
Base class for all FW4SPL&#39;s classes.
Definition: BaseObject.hpp:22
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
virtual BlockerSptrType getBlocker()=0
Returns a .. to block this connection.
Base class for Slot connection implementation. This class is for internal use purpose.
virtual void disconnect()=0
Disconnect a Slot from this connection.
virtual void connectNoLock()=0
NOT THREAD SAFE Connect the related Signal and Slot together.
virtual void disconnectWeakLock()=0
NOT THREAD SAFE Disconnect a Slot from this connection.