~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to lib/cppunit-1.10.0/src/cppunit/SynchronizedObject.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2006-11-11 10:32:06 UTC
  • Revision ID: james.westby@ubuntu.com-20061111103206-f3p0r9g0vq44rp3r
Tags: upstream-3.0.PRE5
ImportĀ upstreamĀ versionĀ 3.0.PRE5

Show diffs side-by-side

added added

removed removed

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