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
GUISettingsHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// The handler for parsing gui settings from xml.
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2001-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
#ifndef GUISettingsHandler_h
23
#define GUISettingsHandler_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 <
utils/xml/SUMOSAXHandler.h
>
36
#include <
utils/common/RandomDistributor.h
>
37
38
39
// ===========================================================================
40
// class declarations
41
// ===========================================================================
42
class
GUISUMOAbstractView
;
43
class
Position
;
44
45
46
// ===========================================================================
47
// class definitions
48
// ===========================================================================
52
class
GUISettingsHandler
:
public
SUMOSAXHandler
{
53
public
:
57
GUISettingsHandler
(
const
std::string& content,
bool
isFile =
true
);
58
59
61
~GUISettingsHandler
();
62
63
64
66
67
74
void
myStartElement
(
int
element,
const
SUMOSAXAttributes
& attrs);
76
77
78
82
std::string
addSettings
(
GUISUMOAbstractView
* view = 0)
const
;
83
84
88
void
setViewport
(
GUISUMOAbstractView
* view)
const
;
89
90
96
void
setViewport
(
Position
& lookFrom,
Position
& lookAt)
const
;
97
98
103
void
setSnapshots
(
GUISUMOAbstractView
* view)
const
;
104
105
109
bool
hasDecals
()
const
;
110
111
115
const
std::vector<GUISUMOAbstractView::Decal>&
getDecals
()
const
;
116
117
121
SUMOReal
getDelay
()
const
;
122
123
127
const
std::vector<SUMOTime>&
getBreakpoints
()
const
{
128
return
myBreakpoints
;
129
}
130
131
133
static
std::vector<SUMOTime>
loadBreakpoints
(
const
std::string& file);
134
135
139
const
std::string&
getViewType
()
const
{
140
return
myViewType
;
141
}
142
143
RandomDistributor<std::string>
getEventDistribution
(
const
std::string&
id
);
144
SUMOReal
getJamSoundTime
() {
145
return
myJamSoundTime
;
146
}
147
148
private
:
150
GUIVisualizationSettings
mySettings
;
151
153
std::string
myViewType
;
154
156
SUMOReal
myDelay
;
157
159
Position
myLookFrom
;
160
162
Position
myLookAt
;
163
165
std::map<SUMOTime, std::string>
mySnapshots
;
166
168
std::vector<GUISUMOAbstractView::Decal>
myDecals
;
169
171
int
myCurrentColorer
;
172
174
GUIColorScheme
*
myCurrentScheme
;
175
177
std::vector<SUMOTime>
myBreakpoints
;
178
180
std::map<std::string, RandomDistributor<std::string> >
myEventDistributions
;
181
SUMOReal
myJamSoundTime
;
182
183
private
:
184
186
GUIVisualizationTextSettings
parseTextSettings
(
187
const
std::string& prefix,
const
SUMOSAXAttributes
& attrs,
188
GUIVisualizationTextSettings
defaults);
189
190
};
191
192
#endif
193
194
/****************************************************************************/
tmp
buildd
sumo-0.21.0+dfsg
src
utils
gui
settings
GUISettingsHandler.h
Generated on Thu Nov 20 2014 19:49:54 for SUMO - Simulation of Urban MObility by
1.8.1.2