fw4spl
InsertSeries.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 "uiMedDataQt/InsertSeries.hpp"
8 
9 #include <fwData/Exception.hpp>
10 #include <fwData/registry/macros.hpp>
11 
12 fwDataRegisterMacro( ::uiMedDataQt::InsertSeries );
13 
14 namespace uiMedDataQt
15 {
16 
18  Series(key)
19 {
20 }
21 
22 //------------------------------------------------------------------------------
23 
25 {
26 }
27 
28 //------------------------------------------------------------------------------
29 
30 void InsertSeries::shallowCopy(const ::fwData::Object::csptr& _source)
31 {
32  InsertSeries::csptr other = InsertSeries::dynamicConstCast(_source);
33  FW_RAISE_EXCEPTION_IF( ::fwData::Exception(
34  "Unable to copy" + (_source ? _source->getClassname() : std::string("<NULL>"))
35  + " to " + this->getClassname()), !bool(other) );
36 
37  this->::fwMedData::Series::shallowCopy(_source);
38 }
39 
40 //------------------------------------------------------------------------------
41 
42 void InsertSeries::cachedDeepCopy(const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache)
43 {
44  InsertSeries::csptr other = InsertSeries::dynamicConstCast(_source);
45  FW_RAISE_EXCEPTION_IF( ::fwData::Exception(
46  "Unable to copy" + (_source ? _source->getClassname() : std::string("<NULL>"))
47  + " to " + this->getClassname()), !bool(other) );
48 
49  this->::fwMedData::Series::cachedDeepCopy(_source, cache);
50 }
51 
52 //------------------------------------------------------------------------------
53 
54 } // namespace uiMedDataQt
55 
The namespace uiMedDataQt contains editors for medical data.
Used as a placeholder in uiMedDataQt::editor::SSelector UI to insert create and insert new series in ...
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
FWMEDDATA_API void cachedDeepCopy(const ::fwData::Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
UIMEDDATAQT_API void cachedDeepCopy(const ::fwData::Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
UIMEDDATAQT_API void shallowCopy(const ::fwData::Object::csptr &_source) override
Defines shallow copy.
virtual UIMEDDATAQT_API ~InsertSeries()
Destructor.
UIMEDDATAQT_API InsertSeries(::fwData::Object::Key key)
Constructor.
virtual const std::string & getClassname() const override
return full object&#39;s classname with its namespace, i.e. fwCore::BaseObject
FWMEDDATA_API void shallowCopy(const ::fwData::Object::csptr &_source) override
Defines shallow copy.