1 #include <cppunit/SynchronizedObject.h> 2 3 4 namespace CppUnit 5 { 6 7 8 9 SynchronizedObject(SynchronizationObject * syncObject)10SynchronizedObject::SynchronizedObject( SynchronizationObject *syncObject ) 11 : m_syncObject( syncObject == 0 ? new SynchronizationObject() : 12 syncObject ) 13 { 14 } 15 16 ~SynchronizedObject()17SynchronizedObject::~SynchronizedObject() 18 { 19 delete m_syncObject; 20 } 21 22 23 /** Accept a new synchronization object for protection of this instance 24 * TestResult assumes ownership of the object 25 */ 26 void setSynchronizationObject(SynchronizationObject * syncObject)27SynchronizedObject::setSynchronizationObject( SynchronizationObject *syncObject ) 28 { 29 delete m_syncObject; 30 m_syncObject = syncObject; 31 } 32 33 34 } // namespace CppUnit 35 36