fw4spl
SReader.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 "ioAtoms/config.hpp"
10 
11 #include <fwCom/Signal.hpp>
12 
13 #include <fwIO/IReader.hpp>
14 
15 #include <fwJobs/IJob.hpp>
16 
17 #include <map>
18 #include <set>
19 
20 namespace fwMemory
21 {
22 class IPolicy;
23 }
24 
25 namespace ioAtoms
26 {
27 
89 class IOATOMS_CLASS_API SReader : public ::fwIO::IReader
90 {
91 
92 public:
93 
95  typedef ::fwCom::Signal< void ( ::fwJobs::IJob::sptr ) > JobCreatedSignalType;
96 
98 
100  SReader();
101 
103  virtual ~SReader() noexcept
104  {
105  }
106 
108  IOATOMS_API void configureWithIHM() override;
109 
111  typedef std::map< std::string, std::string > FileExtension2NameType;
112 
114  static const FileExtension2NameType s_EXTENSIONS;
115 
116 protected:
117 
119  IOATOMS_API void starting() override;
120 
122  IOATOMS_API void stopping() override;
123 
125  IOATOMS_API void configuring() override;
126 
130  IOATOMS_API void updating() override;
131 
133  IOATOMS_API ::fwIO::IOPathType getIOPathType() const override;
134 
135 private:
136 
138  void notificationOfUpdate();
139 
141  bool m_outputMode;
142 
144  std::string m_uuidPolicy;
145 
147  bool m_useAtomsPatcher;
148 
150  std::string m_context;
151 
153  std::string m_version;
154 
156  std::set< std::string > m_allowedExts;
157 
159  std::string m_filter;
160 
162  FileExtension2NameType m_customExts;
163 
165  FileExtension2NameType m_allowedExtLabels;
166 
168  JobCreatedSignalType::sptr m_sigJobCreated;
169 };
170 
171 } // namespace ioAtoms
The namespace fwMemory contains tools to manage memory. Use for dump.
Definition: SReader.hpp:20
std::map< std::string, std::string > FileExtension2NameType
Maps file extension to format name.
Definition: SReader.hpp:111
::fwCom::Signal< void(::fwJobs::IJob::sptr) > JobCreatedSignalType
Signal type for job creation.
Definition: SReader.hpp:95
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
static const FileExtension2NameType s_EXTENSIONS
Managed file extensions.
Definition: SReader.hpp:114
virtual ~SReader() noexcept
Does nothing.
Definition: SReader.hpp:103
Atoms reader. Service to load data from Atoms format.
Definition: SReader.hpp:89
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains services to read and write data via atom conversion.
Defines the memory dump policy interface.
Definition: IPolicy.hpp:23