fw4spl
include/fwData/ReconstructionTraits.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 "fwData/factory/new.hpp"
10 #include "fwData/Node.hpp"
11 #include "fwData/StructureTraits.hpp"
12 
13 fwCampAutoDeclareDataMacro((fwData)(ReconstructionTraits), FWDATA_API);
14 
15 namespace fwData
16 {
17 
29 class FWDATA_CLASS_API ReconstructionTraits : public ::fwData::Object
30 {
31 public:
33  ::fwData::factory::New< ReconstructionTraits >);
34  fwCampMakeFriendDataMacro((fwData)(ReconstructionTraits));
35 
40  FWDATA_API ReconstructionTraits(::fwData::Object::Key key);
41 
45  FWDATA_API virtual ~ReconstructionTraits();
46 
51  std::string& getIdentifier ();
52  const std::string& getIdentifier () const;
53  void setIdentifier (const std::string& _identifier);
55 
57  FWDATA_API void setMaskOpNode(const ::fwData::Node::sptr& maskOpNode );
58 
60  FWDATA_API ::fwData::Node::sptr getMaskOpNode();
61 
63  FWDATA_API void setMeshOpNode(const ::fwData::Node::sptr& meshOpNode );
64 
66  FWDATA_API ::fwData::Node::sptr getMeshOpNode();
67 
69  FWDATA_API void setStructureTraits(const ::fwData::StructureTraits::sptr& structureTraits );
70 
72  FWDATA_API ::fwData::StructureTraits::sptr getStructureTraits();
73 
75  FWDATA_API void cachedDeepCopy(const Object::csptr& _source, DeepCopyCacheType& cache) override;
76 
77 private:
78 
80  std::string m_identifier;
81 
83  ::fwData::Node::sptr m_maskOpNode;
84 
86  ::fwData::Node::sptr m_meshOpNode;
87 
89  ::fwData::StructureTraits::sptr m_structureTraits;
90 
91 };
92 
93 //-----------------------------------------------------------------------------
94 
96 {
97  return m_identifier;
98 }
99 
100 //-----------------------------------------------------------------------------
101 
102 inline const std::string& ReconstructionTraits::getIdentifier () const
103 {
104  return m_identifier;
105 }
106 
107 //-----------------------------------------------------------------------------
108 
109 inline void ReconstructionTraits::setIdentifier (const std::string& _identifier)
110 {
111  m_identifier = _identifier;
112 }
113 
114 //-----------------------------------------------------------------------------
115 
116 } // namespace fwData
This class defines Reconstruction traits.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
std::string & getIdentifier()
Get/Set value of the identifier.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Base class for each data object.
Contains the representation of the data objects used in the framework.
void setIdentifier(const std::string &_identifier)
Get/Set value of the identifier.