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.sourceforge.net/
12
// Copyright (C) 2001-2013 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
37
38
// ===========================================================================
39
// class declarations
40
// ===========================================================================
41
class
GUISUMOAbstractView
;
42
class
Position
;
43
44
45
// ===========================================================================
46
// class definitions
47
// ===========================================================================
51
class
GUISettingsHandler
:
public
SUMOSAXHandler
{
52
public
:
56
GUISettingsHandler
(
const
std::string& content,
bool
isFile =
true
);
57
58
60
~GUISettingsHandler
();
61
62
63
65
66
73
void
myStartElement
(
int
element,
const
SUMOSAXAttributes
& attrs);
75
76
77
81
std::string
addSettings
(
GUISUMOAbstractView
* view = 0)
const
;
82
83
87
void
setViewport
(
GUISUMOAbstractView
* view)
const
;
88
89
95
void
setViewport
(
Position
& lookFrom,
Position
& lookAt)
const
;
96
97
102
void
setSnapshots
(
GUISUMOAbstractView
* view)
const
;
103
104
108
bool
hasDecals
()
const
;
109
110
114
const
std::vector<GUISUMOAbstractView::Decal>&
getDecals
()
const
;
115
116
120
SUMOReal
getDelay
()
const
;
121
122
126
const
std::vector<SUMOTime>&
getBreakpoints
()
const
{
127
return
myBreakpoints
;
128
}
129
130
132
static
std::vector<SUMOTime>
loadBreakpoints
(
const
std::string& file);
133
134
138
const
std::string&
getViewType
()
const
{
139
return
myViewType
;
140
}
141
142
143
private
:
145
GUIVisualizationSettings
mySettings
;
146
148
std::string
myViewType
;
149
151
SUMOReal
myDelay
;
152
154
Position
myLookFrom
;
155
157
Position
myLookAt
;
158
160
std::map<SUMOTime, std::string>
mySnapshots
;
161
163
std::vector<GUISUMOAbstractView::Decal>
myDecals
;
164
166
int
myCurrentColorer
;
167
169
GUIColorScheme
*
myCurrentScheme
;
170
172
std::vector<SUMOTime>
myBreakpoints
;
173
174
private
:
175
177
GUIVisualizationTextSettings
parseTextSettings
(
178
const
std::string& prefix,
const
SUMOSAXAttributes
& attrs,
179
GUIVisualizationTextSettings
defaults);
180
181
};
182
183
#endif
184
185
/****************************************************************************/
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
utils
gui
settings
GUISettingsHandler.h
Generated on Sun Jun 16 2013 07:07:19 for SUMO - Simulation of Urban MObility by
1.8.1.2