fw4spl
Study1.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
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 #include <fwAtoms/String.hpp>
8 
9 #include <fwAtomsPatch/helper/Object.hpp>
10 
11 #include "fwStructuralPatch/creator/fwMedData/Study1.hpp"
12 
13 namespace fwStructuralPatch
14 {
15 namespace creator
16 {
17 namespace fwMedData
18 {
19 
21 {
22  m_classname = "::fwMedData::Study";
23  m_version = "1";
24 }
25 
26 // ----------------------------------------------------------------------------
27 
29 {
30 }
31 
32 // ----------------------------------------------------------------------------
33 
35 {
36 }
37 
38 // ----------------------------------------------------------------------------
39 
40 ::fwAtoms::Object::sptr Study1::create()
41 {
42  ::fwAtoms::Object::sptr study = this->createObjBase();
43  ::fwAtomsPatch::helper::Object helper(study);
44 
45  helper.addAttribute("instance_uid", ::fwAtoms::String::New(""));
46  helper.addAttribute("date", ::fwAtoms::String::New(""));
47  helper.addAttribute("time", ::fwAtoms::String::New(""));
48  helper.addAttribute("referring_physician_name", ::fwAtoms::String::New(""));
49  helper.addAttribute("description", ::fwAtoms::String::New(""));
50  helper.addAttribute("patient_age", ::fwAtoms::String::New(""));
51 
52  return study;
53 }
54 
55 } // namespace fwMedData
56 } // namespace creator
57 } // namespace fwStructuralPatch
virtual FWSTRUCTURALPATCH_API::fwAtoms::Object::sptr create() override
Creates the specified object.
Definition: Study1.cpp:40
Namespace containing medical data.
FWSTRUCTURALPATCH_API ~Study1()
Destructor.
Definition: Study1.cpp:28
std::string m_version
Object version.
static FWATOMS_API String::sptr New(std::string value)
Construct a new Object represented a string.
Contains base functionalities used to transform objects from a version to another.
Definition: Abstract.hpp:16
FWSTRUCTURALPATCH_API Study1()
Constructor.
Definition: Study1.cpp:20
Contains creators and structural patches.
Definition: Landmarks1.hpp:13
Structural creator for fwMedData::Study version &#39;1&#39;.
Definition: Study1.hpp:21
FWATOMSPATCH_API::fwAtoms::Object::sptr createObjBase() const
Create the object base : create meta infos : classname, version and id.
FWATOMSPATCH_API void addAttribute(const std::string &name,::fwAtoms::Base::sptr value, conditions::Abstract::sptr condition=conditions::Abstract::New())
Adds a new attribute in the current object.
FWATOMSPATCH_API IStructuralCreator()
Constructor.
std::string m_classname
Object classname.