7 #include "fwData/ObjectLock.hpp" 9 #include <fwMemory/BufferObject.hpp> 16 ObjectLock::~ObjectLock()
25 ObjectLock::ObjectLock(
const ObjectLock & objectLock)
27 m_objects = objectLock.m_objects;
28 m_locks = objectLock.m_locks;
33 ObjectLock & ObjectLock::operator=(
const ObjectLock & objectLock)
38 m_objects = objectLock.m_objects;
39 m_locks = objectLock.m_locks;
46 void ObjectLock::lock( ::fwData::Array::sptr array, LocksType & locks )
50 locks.push_back( array->getBufferObject()->lock() );
51 m_objects.push_back(array);
57 void ObjectLock::lock( ::fwData::Image::sptr image, LocksType & locks )
61 this->lock( image->getDataArray(), locks );
67 void ObjectLock::lock( ::fwData::Mesh::sptr mesh, LocksType & locks )
71 this->lock( mesh->getPointsArray(), locks );
72 this->lock( mesh->getCellDataArray(), locks );
73 this->lock( mesh->getCellDataOffsetsArray(), locks );
74 this->lock( mesh->getCellTypesArray(), locks );
76 this->lock( mesh->getCellColorsArray(), locks );
77 this->lock( mesh->getPointColorsArray(), locks );
78 this->lock( mesh->getCellNormalsArray(), locks );
79 this->lock( mesh->getPointNormalsArray(), locks );
85 void ObjectLock::lock( ::fwData::Reconstruction::sptr rec, LocksType & locks )
89 this->lock( rec->getImage(), locks );
90 this->lock( rec->getMesh(), locks );
96 ObjectLock::ObjectLock( ::fwData::Object::sptr obj )
98 ::fwData::Image::sptr image = ::fwData::Image::dynamicCast( obj );
99 ::fwData::Mesh::sptr mesh = ::fwData::Mesh::dynamicCast( obj );
100 ::fwData::Array::sptr array = ::fwData::Array::dynamicCast( obj );
104 this->lock( image, m_locks );
108 this->lock( mesh, m_locks );
112 this->lock( array, m_locks );
Contains the representation of the data objects used in the framework.