CppUnit project page FAQ

SynchronizedObject.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_SYNCHRONIZEDOBJECT_H
2 #define CPPUNIT_SYNCHRONIZEDOBJECT_H
3 
4 #include <cppunit/Portability.h>
5 
6 
8 
9 
23 {
24 public:
28  {
29  public:
32 
33  virtual void lock() {}
34  virtual void unlock() {}
35  };
36 
39  SynchronizedObject( SynchronizationObject *syncObject =0 );
40 
42  virtual ~SynchronizedObject();
43 
44 protected:
48  {
50 
51  public:
53  : m_syncObject( syncObject )
54  {
55  m_syncObject->lock();
56  }
57 
59  {
60  m_syncObject->unlock ();
61  }
62  };
63 
64  virtual void setSynchronizationObject( SynchronizationObject *syncObject );
65 
66 protected:
68 
69 private:
72 
74  void operator =( const SynchronizedObject &copy );
75 };
76 
77 
79 
80 #endif // CPPUNIT_SYNCHRONIZEDOBJECT_H

Send comments to:
CppUnit Developers