SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MFXMutex.h
Go to the documentation of this file.
1
/****************************************************************************/
9
//
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2007-2014 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
23
24
#ifndef MFXMUTEX_H
25
#define MFXMUTEX_H
26
27
28
// ===========================================================================
29
// included modules
30
// ===========================================================================
31
#ifdef _MSC_VER
32
#include <
windows_config.h
>
33
#else
34
#include <
config.h
>
35
#endif
36
37
#include <fx.h>
38
#include <
utils/common/AbstractMutex.h
>
39
40
#ifndef WIN32
41
typedef
void
*
FXThreadMutex
;
// handle to a mutex
42
#else
43
#define NOMINMAX
44
#include <windows.h>
45
#undef NOMINMAX
46
typedef
HANDLE
FXThreadMutex
;
// handle to a mutex
47
#endif
48
49
50
51
56
class
MFXMutex
:
public
AbstractMutex
{
57
public
:
59
MFXMutex
();
60
62
void
lock
();
63
65
void
unlock
();
66
68
virtual
~MFXMutex
();
69
70
inline
FXbool
locked
() {
71
return
lock_
? TRUE : FALSE;
72
}
73
74
protected
:
75
FXuint
lock_
;
// lock count
76
77
private
:
78
FXThreadMutex
mutexHandle
;
79
80
private
:
81
// dummy copy constructor and operator= to prevent copying
82
MFXMutex
(
const
MFXMutex
&);
83
MFXMutex
&
operator=
(
const
MFXMutex
&);
84
85
};
86
87
#endif // FXMUTEX_H
tmp
buildd
sumo-0.21.0+dfsg
src
utils
foxtools
MFXMutex.h
Generated on Thu Nov 20 2014 19:49:54 for SUMO - Simulation of Urban MObility by
1.8.1.2