fw4spl
SImageSignalForwarder.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_WRAPPER_SIMAGESIGNALFORWARDER_HPP__
8 #define __CTRLSELECTION_WRAPPER_SIMAGESIGNALFORWARDER_HPP__
9 
10 #include "ctrlSelection/config.hpp"
11 #include "ctrlSelection/IWrapperSrv.hpp"
12 
13 #include <fwData/Point.hpp>
14 #include <fwData/PointList.hpp>
15 
16 #include <fwServices/IService.hpp>
17 
18 namespace ctrlSelection
19 {
20 
21 namespace wrapper
22 {
45 class CTRLSELECTION_CLASS_API SImageSignalForwarder : public ::ctrlSelection::IWrapperSrv
46 {
47 
48 public:
49 
51 
52  CTRLSELECTION_API SImageSignalForwarder() noexcept;
53 
54  CTRLSELECTION_API virtual ~SImageSignalForwarder() noexcept;
55 
56 protected:
57 
59  CTRLSELECTION_API virtual void starting() override;
60 
62  CTRLSELECTION_API virtual void stopping() override;
63 
65  CTRLSELECTION_API virtual void swapping() override;
66 
70  CTRLSELECTION_API virtual void configuring() override;
71 
73  CTRLSELECTION_API virtual void updating() override;
74 
76  CTRLSELECTION_API virtual void info( std::ostream& _sstream ) override;
77 
78 private:
79 
86  void forwardModified();
87  void forwardBufferModified();
88  void forwardLandmarkAdded(SPTR(::fwData::Point) point);
89  void forwardLandmarkRemoved(SPTR(::fwData::Point) point);
90  void forwardLandmarkDisplayed(bool display);
91  void forwardDistanceAdded(SPTR(::fwData::PointList) pointList);
92  void forwardDistanceRemoved(CSPTR(::fwData::PointList) pointList);
93  void forwardDistanceDisplayed(bool display);
94  void forwardSliceIndexModified(int axial, int frontal, int sagittal);
95  void forwardSliceTypeModified(int from, int to);
96  void forwardVisibilityModified(bool visibility);
97  void forwardTransparencyModified();
98  void forwardAddedFields(::fwData::Object::FieldsContainerType objects);
99  void forwardChangedFields(::fwData::Object::FieldsContainerType newObjects,
100  ::fwData::Object::FieldsContainerType oldObjects);
101  void forwardRemovedFields(::fwData::Object::FieldsContainerType objects);
106  ::fwCom::helper::SigSlotConnection m_connections;
108 
109  std::string m_sourceImageUid;
110  std::string m_sourceCompoUid;
111  std::string m_sourceImageKey;
112 
113  typedef std::vector<std::string> SignalKeysType;
114  SignalKeysType m_managedSignals;
115 
116  typedef std::map< std::string, std::string > AvailableConnectionMapType;
117  static AvailableConnectionMapType m_availableConnection;
118 };
119 
120 } // wrapper
121 } // ctrlSelection
122 
123 #endif // __CTRLSELECTION_WRAPPER_SIMAGESIGNALFORWARDER_HPP__
#define SPTR(_cls_)
#define CSPTR(_cls_)
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
STL namespace.
The purpose of this service is to wrap messages incoming to the object to new messages.
Definition: IWrapperSrv.hpp:24
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.
The namespace ctrlSelection contains several interfaces for manager, updater and wrapper.
Definition: BookmarkSrv.hpp:15
This service forwards signals from an image ti another.