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
GUIRunThread.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// The thread that runs the simulation
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 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
#ifndef GUIRunThread_h
23
#define GUIRunThread_h
24
25
26
// ===========================================================================
27
// included modules
28
// ===========================================================================
29
#ifdef _MSC_VER
30
#include <
windows_config.h
>
31
#else
32
#include <
config.h
>
33
#endif
34
35
#include <string>
36
#include <iostream>
37
#include <fx.h>
38
#include <
utils/foxtools/FXSingleEventThread.h
>
39
#include <
utils/foxtools/FXRealSpinDial.h
>
40
#include <
utils/foxtools/FXThreadEvent.h
>
41
#include <
utils/foxtools/MFXEventQue.h
>
42
#include <
utils/common/SUMOTime.h
>
43
44
45
// ===========================================================================
46
// class declarations
47
// ===========================================================================
48
class
GUINet
;
49
class
OutputDevice
;
50
51
52
// ===========================================================================
53
// class definition
54
// ===========================================================================
62
class
GUIRunThread
:
public
FXSingleEventThread
{
63
public
:
65
GUIRunThread
(FXApp* app,
MFXInterThreadEventClient
* mw,
66
FXRealSpinDial
& simDelay,
MFXEventQue
& eq,
FXEX::FXThreadEvent
& ev);
67
69
virtual
~GUIRunThread
();
70
72
virtual
void
init
(
GUINet
* net,
SUMOTime
start,
SUMOTime
end);
73
75
virtual
FXint
run
();
76
79
void
resume
();
80
83
void
singleStep
();
84
86
virtual
void
begin
();
87
89
void
stop
();
90
92
bool
simulationAvailable
()
const
;
93
94
virtual
bool
simulationIsStartable
()
const
;
95
virtual
bool
simulationIsStopable
()
const
;
96
virtual
bool
simulationIsStepable
()
const
;
97
99
virtual
void
deleteSim
();
100
102
GUINet
&
getNet
()
const
;
103
105
void
prepareDestruction
();
106
108
void
retrieveMessage
(
const
MsgHandler::MsgType
type,
const
std::string& msg);
109
110
protected
:
111
void
makeStep
() ;
112
113
protected
:
115
GUINet
*
myNet
;
116
118
SUMOTime
mySimStartTime
,
mySimEndTime
;
119
121
bool
myHalting
;
122
125
bool
myQuit
;
126
130
bool
mySimulationInProgress
;
131
132
bool
myOk
;
133
135
bool
mySingle
;
136
139
OutputDevice
*
myErrorRetriever
, *
myMessageRetriever
, *
myWarningRetriever
;
140
141
FXRealSpinDial
&
mySimDelay
;
142
143
MFXEventQue
&
myEventQue
;
144
145
FXEX::FXThreadEvent
&
myEventThrow
;
146
147
MFXMutex
mySimulationLock
;
148
149
};
150
151
152
#endif
153
154
/****************************************************************************/
155
tmp
buildd
sumo-0.15.0~dfsg
src
gui
GUIRunThread.h
Generated on Sun May 27 2012 14:52:05 for SUMO - Simulation of Urban MObility by
1.8.1