fw4spl
Spline.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
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/Spline.hpp"
8 
9 #include "fwData/Exception.hpp"
10 #include "fwData/registry/macros.hpp"
11 
12 fwDataRegisterMacro( ::fwData::Spline );
13 
14 namespace fwData
15 {
16 
17 //------------------------------------------------------------------------------
18 
20 {
21  FW_DEPRECATED_MSG("This data is deprecated, use ::fwData::PointList instead", "18.0");
22 }
23 
24 //------------------------------------------------------------------------------
25 
27 {
29  m_points.clear();
30 }
31 
32 //------------------------------------------------------------------------------
33 
35 {
36  return m_points;
37 }
38 
39 //------------------------------------------------------------------------------
40 
41 void Spline::cachedDeepCopy(const Object::csptr& source, DeepCopyCacheType& cache)
42 {
43  Spline::csptr other = Spline::dynamicConstCast(source);
44  FW_RAISE_EXCEPTION_IF( ::fwData::Exception(
45  "Unable to copy" + (source ? source->getClassname() : std::string("<NULL>"))
46  + " to " + this->getClassname()), !bool(other) );
47  this->fieldDeepCopy( source, cache );
48 
49  SLM_FATAL("Not implemented." );
50 }
51 
52 //------------------------------------------------------------------------------
53 
54 } // namespace fwData
Points m_points
Points container.
Definition: Spline.hpp:110
virtual FWDATA_API ~Spline()
destructor
Definition: Spline.cpp:26
FWDATA_API void cachedDeepCopy(const Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
Definition: Spline.cpp:41
#define SLM_TRACE_FUNC()
Trace contextual function signature.
Definition: spyLog.hpp:329
FWDATA_API Spline(::fwData::Object::Key key)
Constructor.
Definition: Spline.cpp:19
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
FWDATA_API Points & points()
returns editable point container
Definition: Spline.cpp:34
#define FW_DEPRECATED_MSG(message, version)
Use this macro when deprecating a function to warn the developer.
Definition: spyLog.hpp:360
#define SLM_FATAL(message)
Definition: spyLog.hpp:283
virtual const std::string & getClassname() const override
return full object&#39;s classname with its namespace, i.e. fwCore::BaseObject
Definition: Spline.hpp:25
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
std::vector< point > Points
3D point container
Definition: Spline.hpp:59
Contains the representation of the data objects used in the framework.
This class defines a spline object.
Definition: Spline.hpp:22