fw4spl
IStructuralCreator.hpp
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 #ifndef __FWATOMSPATCH_ISTRUCTURALCREATOR_HPP__
8 #define __FWATOMSPATCH_ISTRUCTURALCREATOR_HPP__
9 
10 #include <string>
11 
12 #include <fwCore/base.hpp>
13 #include <fwAtoms/Object.hpp>
14 
15 #include "fwAtomsPatch/config.hpp"
16 
17 
18 namespace fwAtomsPatch
19 {
20 
26 class FWATOMSPATCH_CLASS_API IStructuralCreator : public ::fwCore::BaseObject
27 {
28 
29 public:
32 
34  FWATOMSPATCH_API IStructuralCreator();
35 
37  FWATOMSPATCH_API IStructuralCreator( const IStructuralCreator &cpy );
38 
40  FWATOMSPATCH_API virtual ~IStructuralCreator();
41 
43  FWATOMSPATCH_API virtual ::fwAtoms::Object::sptr create() = 0;
44 
46  FWATOMSPATCH_API virtual const std::string& getObjectVersion() const;
47 
49  FWATOMSPATCH_API virtual const std::string& getObjectClassname() const;
50 
51 protected:
52 
54  FWATOMSPATCH_API ::fwAtoms::Object::sptr createObjBase() const;
55 
57  std::string m_classname;
58 
60  std::string m_version;
61 };
62 
63 
64 } //fwAtomsPatch
65 #endif /* __FWATOMSPATCH_ISTRUCTURALCREATOR_HPP__ */
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
Base class for all FW4SPL&#39;s classes.
Definition: BaseObject.hpp:22
Base class of all structural creators. Creates a new atom object with the default values correspondin...
std::string m_version
Object version.
Contains base functionalities used to transform objects from a version to another.
Definition: Abstract.hpp:16
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
std::string m_classname
Object classname.