fw4spl
SManage.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __CTRLSELECTION_SMANAGE_HPP__
8 #define __CTRLSELECTION_SMANAGE_HPP__
9 
10 #include "ctrlSelection/config.hpp"
11 
12 #include <fwData/Object.hpp>
13 
14 #include <fwServices/IController.hpp>
15 
16 namespace ctrlSelection
17 {
18 
91 class CTRLSELECTION_CLASS_API SManage : public ::fwServices::IController
92 {
93 
94 public:
95 
97 
99  CTRLSELECTION_API SManage() noexcept;
100 
102  CTRLSELECTION_API virtual ~SManage() noexcept;
103 
108  static const ::fwCom::Slots::SlotKeyType s_ADD_SLOT;
109  static const ::fwCom::Slots::SlotKeyType s_ADD_COPY_SLOT;
110  static const ::fwCom::Slots::SlotKeyType s_ADD_OR_SWAP_SLOT;
111  static const ::fwCom::Slots::SlotKeyType s_SWAP_OBJ_SLOT;
112  static const ::fwCom::Slots::SlotKeyType s_REMOVE_SLOT;
113  static const ::fwCom::Slots::SlotKeyType s_REMOVE_IF_PRESENT_SLOT;
114  static const ::fwCom::Slots::SlotKeyType s_CLEAR_SLOT;
119 protected:
120 
122  CTRLSELECTION_API virtual void configuring() override;
123 
125  CTRLSELECTION_API virtual void starting() override;
126 
128  CTRLSELECTION_API virtual void stopping() override;
129 
131  CTRLSELECTION_API virtual void updating() override;
132 
137  void add();
139 
141  void addCopy();
142 
148  void addOrSwap();
149 
151  void swap();
152 
154  void remove();
155 
157  void removeIfPresent();
158 
160  void clear();
165 private:
166 
167  void internalAdd(bool _copy);
168 
169  std::string m_objectUid;
170  std::string m_compositeKey;
171  std::string m_fieldName;
172 
173 };
174 
175 } // ctrlSelection
176 
177 #endif // __CTRLSELECTION_SMANAGE_HPP__
This service manages an object (add/swap/remove) into a container object (composite, vector, seriesDB).
Definition: SManage.hpp:91
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
STL namespace.
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace ctrlSelection contains several interfaces for manager, updater and wrapper.
Definition: BookmarkSrv.hpp:15