fw4spl
DictionaryReader.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 __FWDATAIO_READER_DICTIONARYREADER_HPP__
8 #define __FWDATAIO_READER_DICTIONARYREADER_HPP__
9 
10 #include "fwDataIO/config.hpp"
11 #include "fwDataIO/reader/GenericObjectReader.hpp"
12 
13 #include <fwData/location/SingleFile.hpp>
14 #include <fwData/StructureTraitsDictionary.hpp>
15 
16 #include <boost/filesystem.hpp>
17 
18 namespace fwData
19 {
20 class StructureTraitsDictionary;
21 }
22 
23 namespace fwDataIO
24 {
25 
26 namespace reader
27 {
28 
36 class FWDATAIO_CLASS_API DictionaryReader :
37  public GenericObjectReader< ::fwData::StructureTraitsDictionary>,
38  public ::fwData::location::enableSingleFile< IObjectReader >
39 
40 {
41 
42 public:
43 
46  (()),
47  ::fwDataIO::reader::factory::New< DictionaryReader >
48  );
49 
52 
54  FWDATAIO_API virtual ~DictionaryReader();
55 
57  FWDATAIO_API virtual void read() override;
58 
59  FWDATAIO_API std::string extension() override;
60 
62  FWDATAIO_API static ::boost::filesystem::path getDefaultDictionaryPath();
63 };
64 
65 } // namespace reader
66 
67 } // namespace fwDataIO
68 
69 #endif // __FWDATAIO_READER_DICTIONARYREADER_HPP__
This namespace fwDataIO contains reader and writer for several framework&#39;s data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
generic class for all object readers.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
This class is derived by reader/writer.
Definition: SingleFile.hpp:70
Dictionary reader. Read file with .dic extension.
Contains the representation of the data objects used in the framework.