9 #include "fwData/config.hpp" 10 #include "fwData/factory/new.hpp" 11 #include "fwData/Object.hpp" 12 #include "fwData/Point.hpp" 14 #include <fwCom/Signal.hpp> 15 #include <fwCom/Signals.hpp> 19 fwCampAutoDeclareDataMacro((
fwData)(PointList), FWDATA_API);
32 (()), ::fwData::factory::New< PointList >);
36 typedef std::vector< ::fwData::Point::sptr > PointListContainer;
50 FWDATA_API
void shallowCopy(
const Object::csptr& _source )
override;
54 FWDATA_API
void cachedDeepCopy(
const Object::csptr& _source, DeepCopyCacheType& cache)
override;
59 PointListContainer& getPoints ();
64 const PointListContainer& getPoints ()
const;
69 void setPoints (
const PointListContainer& _vPoints);
74 void pushBack(const ::fwData::Point::sptr& _p);
79 void remove(
size_t _index);
116 return this->m_vPoints;
123 return this->m_vPoints;
130 this->m_vPoints = _vPoints;
137 this->m_vPoints.push_back(_p);
144 const auto it = m_vPoints.begin() +
static_cast<ptrdiff_t
>(_index);
145 this->m_vPoints.erase(it);
152 this->m_vPoints.clear();
PointListContainer & getPoints()
Gets point vector.
void setPoints(const PointListContainer &_vPoints)
Sets point vector.
::fwCom::Signal< void(::fwData::Point::sptr) > PointAddedSignalType
Signal emitted when a Point is added.
PointListContainer m_vPoints
Points container.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_POINT_ADDED_SIG
Signal emitted when a Point is added.
void clear()
Clears the list.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
void pushBack(const ::fwData::Point::sptr &_p)
Adds a fwData::Point in the pointlist.
::fwCom::Signal< void(::fwData::Point::sptr) > PointRemovedSignalType
Signal emitted when a Point is removed.
Base class for each data object.
This class defines a list of points.
Contains the representation of the data objects used in the framework.
void remove(size_t _index)
: Deletes a point at the specified index
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_POINT_REMOVED_SIG
Signal emitted when a Point is added.