X2 Standard  Version 1.24
mutexinterface.h
1 #ifndef _MutexInterface_h
2 #define _MutexInterface_h
3 
4 #define MutexInterface_Name "com.bisque.TheSkyX.Components.MutexInterface/1.0"
5 
16 {
17 public:
18  virtual ~MutexInterface(){};
19 public:
21  virtual void lock()=0;
23  virtual void unlock()=0;
24 };
25 
36 {
37 public:
40  {
41  m_pIOMutex = pIOMutex;
42 
43  if (m_pIOMutex)
44  m_pIOMutex->lock();
45  }
46 
49  {
50  if (m_pIOMutex)
51  m_pIOMutex->unlock();
52  }
53 private:
54 
55  MutexInterface* m_pIOMutex;
56 
57 };
58 #endif
59 
60 //Linux wants a 'newline' at the end of every source file - don't delete the one after this line
MutexInterface::lock
virtual void lock()=0
MutexInterface
The MutexInterface provides a cross-platform mutex.
Definition: mutexinterface.h:16
MutexInterface::unlock
virtual void unlock()=0
X2MutexLocker::~X2MutexLocker
~X2MutexLocker()
Definition: mutexinterface.h:48
X2MutexLocker::X2MutexLocker
X2MutexLocker(MutexInterface *pIOMutex)
Definition: mutexinterface.h:39
X2MutexLocker
The X2MutexLocker provides a cross-platform utility to lock and unlock a MutexInterface.
Definition: mutexinterface.h:36
X2 Examples
(C) Software Bisque, Inc. All rights reserved.