fw4spl
IManagerSrv.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
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 
7 #pragma once
8 
9 #include "ctrlSelection/config.hpp"
10 
11 #include <fwServices/helper/Config.hpp>
12 #include <fwServices/IService.hpp>
13 
14 namespace ctrlSelection
15 {
16 
22 class CTRLSELECTION_CLASS_API IManagerSrv : public ::fwServices::IService
23 {
24 
25 public:
26 
27  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
28  typedef std::string ObjectIdType;
29 
31 
33  CTRLSELECTION_API IManagerSrv();
34 
36  CTRLSELECTION_API virtual ~IManagerSrv();
37 
38 protected:
39 
43  CTRLSELECTION_API virtual void swapping() override;
44 
45  typedef std::map< ObjectIdType, ::fwCom::helper::SigSlotConnection > ObjectConnectionsMapType;
46 
55  void manageConnections(const std::string& objectId, ::fwData::Object::sptr object, ConfigurationType config);
56 
64  void manageConnection(const std::string& objectId, ::fwData::Object::sptr object, ConfigurationType config);
65 
67  void removeConnections(const std::string& objectId);
68 
77  void manageProxies(const std::string& objectId, ::fwData::Object::sptr object, ConfigurationType config);
78 
80  void disconnectProxies(const std::string& objectId);
81 
83  // added/removed.
84  ObjectConnectionsMapType m_objectConnections;
85 
87  ::fwServices::helper::Config::ProxyConnectionsMapType m_proxyCtns;
88 
89 };
90 
91 }
Base class for all services.
Definition: IService.hpp:61
Base class for manager. A manager starts, stops or swaps services on object contained in a composite ...
Definition: IManagerSrv.hpp:22
ObjectConnectionsMapType m_objectConnections
Registers connection associated to an object. Connections are connected/disconnected when the object ...
Definition: IManagerSrv.hpp:84
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
::fwServices::helper::Config::ProxyConnectionsMapType m_proxyCtns
Proxy connection information map : used to properly disconnect proxies.
Definition: IManagerSrv.hpp:87
The namespace ctrlSelection contains several interfaces for manager, updater and wrapper.
Definition: BookmarkSrv.hpp:15