fw4spl
PlaneList.hpp
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 #pragma once
8 
9 #include "fwData/config.hpp"
10 #include "fwData/factory/new.hpp"
11 #include "fwData/Object.hpp"
12 #include "fwData/Plane.hpp"
13 
14 #include <fwCom/Signal.hpp>
15 #include <fwCom/Signals.hpp>
16 
17 #include <vector>
18 
19 fwCampAutoDeclareDataMacro((fwData)(PlaneList), FWDATA_API);
20 namespace fwData
21 {
26 class FWDATA_CLASS_API PlaneList : public Object
27 {
28 
29 public:
30  fwCoreClassDefinitionsWithFactoryMacro( (PlaneList)(::fwData::Object), (()), ::fwData::factory::New< PlaneList >);
31 
32  fwCampMakeFriendDataMacro((fwData)(PlaneList));
33 
34  typedef std::vector< ::fwData::Plane::sptr > PlaneListContainer;
35 
40  FWDATA_API PlaneList(::fwData::Object::Key key);
41 
43  FWDATA_API virtual ~PlaneList();
44 
46  FWDATA_API void shallowCopy( const Object::csptr& _source ) override;
47 
49  FWDATA_API void cachedDeepCopy(const Object::csptr& _source, DeepCopyCacheType& cache) override;
50 
54  PlaneListContainer& getPlanes ();
55  const PlaneListContainer& getPlanes () const;
56  void setPlanes (const PlaneListContainer& _vPlanes);
58 
63  typedef ::fwCom::Signal< void (::fwData::Plane::sptr) > PlaneAddedSignalType;
65  FWDATA_API static const ::fwCom::Signals::SignalKeyType s_PLANE_ADDED_SIG;
66 
68  typedef ::fwCom::Signal< void (::fwData::Plane::sptr) > PlaneRemovedSignalType;
69  FWDATA_API static const ::fwCom::Signals::SignalKeyType s_PLANE_REMOVED_SIG;
70 
72  typedef ::fwCom::Signal< void (bool) > VisibilityModifiedSignalType;
73  FWDATA_API static const ::fwCom::Signals::SignalKeyType s_VISIBILITY_MODIFIED_SIG;
78 protected:
79 
81  PlaneListContainer m_vPlanes;
82 
83 }; // end class PlaneList
84 
85 //-----------------------------------------------------------------------------
86 
87 inline PlaneList::PlaneListContainer& PlaneList::getPlanes ()
88 {
89  return this->m_vPlanes;
90 }
91 
92 //-----------------------------------------------------------------------------
93 
94 inline const PlaneList::PlaneListContainer& PlaneList::getPlanes () const
95 {
96  return this->m_vPlanes;
97 }
98 
99 //-----------------------------------------------------------------------------
100 
101 inline void PlaneList::setPlanes (const PlaneList::PlaneListContainer& _vPlanes)
102 {
103  this->m_vPlanes = _vPlanes;
104 }
105 
106 //-----------------------------------------------------------------------------
107 
108 } // end namespace fwData
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_VISIBILITY_MODIFIED_SIG
Signal emitted when a plane is added.
Definition: PlaneList.hpp:73
PlaneListContainer & getPlanes()
get/set container of all planes
Definition: PlaneList.hpp:87
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_PLANE_REMOVED_SIG
Signal emitted when a plane is added.
Definition: PlaneList.hpp:69
::fwCom::Signal< void(bool) > VisibilityModifiedSignalType
Signal emitted when the visibility changed.
Definition: PlaneList.hpp:72
::fwCom::Signal< void(::fwData::Plane::sptr) > PlaneRemovedSignalType
Signal emitted when a plane is removed.
Definition: PlaneList.hpp:68
PlaneListContainer m_vPlanes
Planes container.
Definition: PlaneList.hpp:81
void setPlanes(const PlaneListContainer &_vPlanes)
get/set container of all planes
Definition: PlaneList.hpp:101
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Base class for each data object.
This class defines a list of planes.
Definition: PlaneList.hpp:26
Contains the representation of the data objects used in the framework.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_PLANE_ADDED_SIG
Signal emitted when a plane is added.
Definition: PlaneList.hpp:65