fw4spl
fwMedData/include/fwMedData/AttachmentSeries.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 __FWMEDDATA_ATTACHMENTSERIES_HPP__
8 #define __FWMEDDATA_ATTACHMENTSERIES_HPP__
9 
10 #include "fwMedData/config.hpp"
11 #include "fwMedData/Series.hpp"
12 #include "fwMedData/types.hpp"
13 
14 #include <fwData/factory/new.hpp>
15 
16 #include <fwMemory/BufferObject.hpp>
17 
18 #include <boost/filesystem/path.hpp>
19 
20 fwCampAutoDeclareDataMacro((fwMedData)(AttachmentSeries), FWMEDDATA_API);
21 
22 namespace fwMedData
23 {
24 
28 class FWMEDDATA_CLASS_API AttachmentSeries : public ::fwMedData::Series
29 {
30 
31 public:
33  ::fwData::factory::New< AttachmentSeries >);
34 
35  fwCampMakeFriendDataMacro((fwMedData)(AttachmentSeries));
36 
41  FWMEDDATA_API AttachmentSeries(::fwData::Object::Key key);
42 
44  FWMEDDATA_API virtual ~AttachmentSeries();
45 
47  FWMEDDATA_API void cachedDeepCopy( const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache ) override;
48 
52  typedef enum
53  {
54  NONE = 1,
55  LOCAL = 2,
56  EMBEDDED = 3
58 
62  FWMEDDATA_API const ::boost::filesystem::path& getAttachmentPath() const;
63 
64  FWMEDDATA_API void setAttachmentPath(const ::boost::filesystem::path& path);
67  FWMEDDATA_API ::fwMemory::BufferObject::sptr getBufferObject() const;
69 
71  FWMEDDATA_API AttachmentAvailability getAttachmentAvailability() const;
72 
74  FWMEDDATA_API std::string getMediaType() const;
75 
77  FWMEDDATA_API void setMediaType(const std::string& mediaType);
78 
79 protected:
80 
82  ::fwMemory::BufferObject::sptr m_buffer;
83 
85  ::boost::filesystem::path m_attachmentPath;
86 
89 
91  std::string m_mediaType;
92 };
93 
94 } //end namespace fwMedData
95 
96 #endif // __FWMEDDATA_ATTACHMENTSERIES_HPP__
97 
Namespace containing medical data.
AttachmentAvailability m_attachmentAvailability
Attachment availability.
std::string m_mediaType
Media type of the attached file.
::boost::filesystem::path m_attachmentPath
Local path of attachment file.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
::fwMemory::BufferObject::sptr m_buffer
BufferObject of the current attachment file.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Base class for each data object.