X2 Standard
Version 1.28
Toggle main menu visibility
Loading...
Searching...
No Matches
licensedinterfaces
mutexinterface.h
1
#ifndef _MutexInterface_h
2
#define _MutexInterface_h
3
4
#define MutexInterface_Name "com.bisque.TheSkyX.Components.MutexInterface/1.0"
5
15
class
MutexInterface
16
{
17
public
:
18
virtual
~MutexInterface
(){};
19
public
:
21
virtual
void
lock
()=0;
23
virtual
void
unlock
()=0;
24
};
25
35
class
X2MutexLocker
36
{
37
public
:
39
X2MutexLocker
(
MutexInterface
* pIOMutex)
40
{
41
m_pIOMutex = pIOMutex;
42
43
if
(m_pIOMutex)
44
m_pIOMutex->
lock
();
45
}
46
48
~X2MutexLocker
()
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
The MutexInterface provides a cross-platform mutex.
Definition
mutexinterface.h:16
MutexInterface::unlock
virtual void unlock()=0
MutexInterface::lock
virtual void lock()=0
X2MutexLocker::~X2MutexLocker
~X2MutexLocker()
Definition
mutexinterface.h:48
X2MutexLocker::X2MutexLocker
X2MutexLocker(MutexInterface *pIOMutex)
Definition
mutexinterface.h:39
X2 Examples
(C) 2026 Software Bisque, Inc. All rights reserved.