7 #include "fwData/registry/macros.hpp" 8 #include "fwData/Exception.hpp" 9 #include "fwData/Vector.hpp" 11 #include <fwCom/Signal.hpp> 12 #include <fwCom/Signal.hxx> 40 Vector::csptr other = Vector::dynamicConstCast(_source);
42 "Unable to copy" + (_source ? _source->getClassname() : std::string(
"<NULL>"))
45 m_container = other->m_container;
52 Vector::csptr other = Vector::dynamicConstCast(source);
54 "Unable to copy" + (source ? source->getClassname() : std::string(
"<NULL>"))
58 m_container.reserve(other->m_container.size());
59 for(
const ContainerType::value_type &obj : other->m_container)
FWDATA_API void shallowCopy(const Object::csptr &_source) override
Defines shallow copy.
FWDATA_API Vector(::fwData::Object::Key key)
Constructor.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
FWDATA_API void cachedDeepCopy(const Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
Implements data exception class.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_ADDED_OBJECTS_SIG
Type of signal when objects are added.
virtual const std::string & getClassname() const override
return full object's classname with its namespace, i.e. fwCore::BaseObject
This class defines a vector of objects.
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
virtual FWDATA_API ~Vector()
Destructor.
static FWDATA_API::fwData::Object::sptr copy(const ::fwData::Object::csptr &source)
return a copy of the source. if source is a null pointer, return a null pointer.
Contains the representation of the data objects used in the framework.
FWDATA_API void fieldShallowCopy(const ::fwData::Object::csptr &source)
A shallow copy of fields (objects in m_children)
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_REMOVED_OBJECTS_SIG
Type of signal when objects are added.