fw4spl
fwAtomsPatch/include/fwAtomsPatch/helper/functions.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_HELPER_FUNCTIONS_HPP__
8 #define __FWATOMSPATCH_HELPER_FUNCTIONS_HPP__
9 
10 #include <fwAtoms/Base.hpp>
11 #include <fwAtoms/Sequence.hpp>
12 #include <fwAtoms/Map.hpp>
13 #include <fwAtoms/Object.hpp>
14 
15 #include "fwAtomsPatch/config.hpp"
16 
17 namespace fwAtomsPatch
18 {
19 namespace helper
20 {
22 FWATOMSPATCH_API std::string getClassname( const ::fwAtoms::Object::sptr & obj );
23 
25 FWATOMSPATCH_API void setClassname( const ::fwAtoms::Object::sptr & obj, const std::string & newClassname );
26 
28 FWATOMSPATCH_API std::string getVersion( const ::fwAtoms::Object::sptr & obj );
29 
31 FWATOMSPATCH_API void setVersion( const ::fwAtoms::Object::sptr & obj, const std::string & newVersion );
32 
34 FWATOMSPATCH_API void generateID( const ::fwAtoms::Object::sptr & obj );
35 
37 FWATOMSPATCH_API void cleanFields( const ::fwAtoms::Object::sptr & obj );
38 
40 FWATOMSPATCH_API void changeUID( const ::fwAtoms::Object::sptr & obj );
41 
43 FWATOMSPATCH_API void changeMapUID( const ::fwAtoms::Map::sptr & map );
44 
46 FWATOMSPATCH_API void changeSeqUID( const ::fwAtoms::Sequence::sptr & seq );
47 
48 } //helper
49 } //fwAtomHelper
50 
51 #endif // __FWATOMSPATCH_HELPER_FUNCTIONS_HPP__
FWATOMSPATCH_API void setVersion(const ::fwAtoms::Object::sptr &obj, const std::string &newVersion)
Set version of an object.
FWATOMSPATCH_API std::string getClassname(const ::fwAtoms::Object::sptr &obj)
Get classname of an object.
FWATOMSPATCH_API void cleanFields(const ::fwAtoms::Object::sptr &obj)
Cleans object fields (also creates them if they are missing)
FWATOMSPATCH_API void changeSeqUID(const ::fwAtoms::Sequence::sptr &seq)
Generates new UUID for seq objects and child objects.
FWATOMSPATCH_API void generateID(const ::fwAtoms::Object::sptr &obj)
Generates new id for the object (also creates it if it is missing )
Contains base functionalities used to transform objects from a version to another.
Definition: Abstract.hpp:16
FWATOMSPATCH_API void changeMapUID(const ::fwAtoms::Map::sptr &map)
Generates new UUID for map objects and child objects.
FWATOMSPATCH_API void changeUID(const ::fwAtoms::Object::sptr &obj)
Generates new UUID for object and child objects.
FWATOMSPATCH_API std::string getVersion(const ::fwAtoms::Object::sptr &obj)
Get version of an object.
FWATOMSPATCH_API void setClassname(const ::fwAtoms::Object::sptr &obj, const std::string &newClassname)
Set classname of an object.