VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vlutil
vlScopedLock.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
******************************************************************************/
8
#pragma once
9
10
#include "
vlMachineTypes.h
"
11
12
#ifdef DtUSE_UTILITIES_NAMESPACE
13
namespace
DtUSE_UTILITIES_NAMESPACE
14
{
15
#endif
16
17
18
19
class
DtMutex
;
20
37
class
DT_DLL_VLUTIL
DtScopedLock
38
{
39
public
:
41
explicit
DtScopedLock
(
DtMutex
& mx,
bool
initially_locked=
true
);
42
44
~
DtScopedLock
();
45
47
void
lock();
48
50
void
unlock();
51
52
//Get the locked state of the mutex.
56
bool
locked()
const
;
57
58
//Get the address of the scoped lock if the mutex is locked,
60
operator
const
void
*()
const
;
61
62
private
:
64
DtScopedLock
(
const
DtScopedLock
&);
65
DtScopedLock
& operator=(
const
DtScopedLock
&);
66
67
protected
:
68
DtMutex
&
myMutex
;
69
bool
myLockedState
;
70
};
71
72
#ifdef DtUSE_UTILITIES_NAMESPACE
73
}
74
#endif
75
Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (
www.mak.com
)