fw4spl
MultiFiles.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 "fwData/registry/macros.hpp"
8 #include "fwData/Exception.hpp"
9 
10 #include "fwData/location/MultiFiles.hpp"
11 
12 fwDataRegisterMacro( ::fwData::location::MultiFiles );
13 
14 
15 
16 
17 namespace fwData
18 {
19 namespace location
20 {
21 
22 //------------------------------------------------------------------------------
23 
25 {
26 }
27 
28 //------------------------------------------------------------------------------
29 
31 {
32 }
33 
34 //------------------------------------------------------------------------------
35 
36 void MultiFiles::setPaths( VectPathType paths)
37 {
38  m_paths = paths;
39 }
40 
41 //------------------------------------------------------------------------------
42 
43 ILocation::VectPathType MultiFiles::getPaths()
44 {
45  return m_paths;
46 }
47 
48 //------------------------------------------------------------------------------
49 
50 void MultiFiles::cachedDeepCopy(const Object::csptr &source, DeepCopyCacheType &cache)
51 {
52  MultiFiles::csptr other = MultiFiles::dynamicConstCast(source);
53  FW_RAISE_EXCEPTION_IF( ::fwData::Exception(
54  "Unable to copy" + (source ? source->getClassname() : std::string("<NULL>"))
55  + " to " + this->getClassname()), !bool(other) );
56  this->fieldDeepCopy( source, cache );
57 
58  OSLM_FATAL("Not implemented." );
59 }
60 
61 //------------------------------------------------------------------------------
62 
63 }
64 }
virtual FWDATA_API ~MultiFiles()
Destructor.
Definition: MultiFiles.cpp:30
virtual const std::string & getClassname() const override
return full object&#39;s classname with its namespace, i.e. fwCore::BaseObject
Definition: MultiFiles.hpp:27
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
FWDATA_API void setPaths(VectPathType paths)
Set file system paths.
Definition: MultiFiles.cpp:36
FWDATA_API MultiFiles(::fwData::Object::Key key)
Constructor.
Definition: MultiFiles.cpp:24
FWDATA_API void cachedDeepCopy(const Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
Definition: MultiFiles.cpp:50
This class defines a multi files location.
Definition: MultiFiles.hpp:24
#define OSLM_FATAL(message)
Definition: spyLog.hpp:285
Contains the representation of the data objects used in the framework.
FWDATA_API VectPathType getPaths()
Set file system paths.
Definition: MultiFiles.cpp:43
VectPathType m_paths
file system paths
Definition: MultiFiles.hpp:47