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
NBNetBuilder.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Instance responsible for building networks
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
13
// Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef NBNetBuilder_h
24
#define NBNetBuilder_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <string>
37
#include <iostream>
38
#include <vector>
39
#include <set>
40
#include "
NBEdgeCont.h
"
41
#include "
NBTypeCont.h
"
42
#include "
NBNodeCont.h
"
43
#include "
NBNode.h
"
44
#include "
NBTrafficLightLogicCont.h
"
45
#include "
NBDistrictCont.h
"
46
#include "
NBJoinedEdgesMap.h
"
47
#include <
utils/common/UtilExceptions.h
>
48
49
50
// ===========================================================================
51
// class declarations
52
// ===========================================================================
53
class
OptionsCont
;
54
class
OutputDevice
;
55
class
GeoConvHelper
;
56
57
58
// ===========================================================================
59
// class definitions
60
// ===========================================================================
113
class
NBNetBuilder
{
114
friend
class
GNENet
;
// for triggering intermediate build steps
115
116
public
:
118
NBNetBuilder
();
119
121
~NBNetBuilder
();
122
123
132
void
applyOptions
(
OptionsCont
& oc);
133
134
142
void
compute
(
OptionsCont
& oc,
143
const
std::set<std::string>& explicitTurnarounds = std::set<std::string>(),
144
bool
removeUnwishedNodes =
true
);
145
146
147
150
154
NBEdgeCont
&
getEdgeCont
() {
155
return
myEdgeCont
;
156
}
157
158
162
NBNodeCont
&
getNodeCont
() {
163
return
myNodeCont
;
164
}
165
166
170
NBTypeCont
&
getTypeCont
() {
171
return
myTypeCont
;
172
}
173
174
178
NBTrafficLightLogicCont
&
getTLLogicCont
() {
179
return
myTLLCont
;
180
}
181
182
186
NBDistrictCont
&
getDistrictCont
() {
187
return
myDistrictCont
;
188
}
189
190
194
const
std::vector<EdgeVector>&
getRoundabouts
()
const
{
195
return
myRoundabouts
;
196
}
197
198
202
const
NBJoinedEdgesMap
&
getJoinedEdgesMap
()
const
{
203
return
myJoinedEdges
;
204
}
206
207
209
void
haveSeenRoundabouts
() {
210
myHaveSeenRoundabouts
=
true
;
211
}
212
213
214
protected
:
219
class
by_id_sorter
{
220
public
:
222
explicit
by_id_sorter
() { }
223
224
int
operator()
(
const
NBNode
* n1,
const
NBNode
* n2)
const
{
225
return
n1->
getID
() < n2->
getID
();
226
}
227
228
};
229
230
protected
:
232
NBNodeCont
myNodeCont
;
233
235
NBTypeCont
myTypeCont
;
236
238
NBEdgeCont
myEdgeCont
;
239
241
NBTrafficLightLogicCont
myTLLCont
;
242
244
NBDistrictCont
myDistrictCont
;
245
247
bool
myHaveSeenRoundabouts
;
248
250
std::vector<EdgeVector>
myRoundabouts
;
251
253
NBJoinedEdgesMap
myJoinedEdges
;
254
255
private
:
257
void
moveToOrigin
(
GeoConvHelper
& geoConvHelper);
258
259
private
:
261
NBNetBuilder
(
const
NBNetBuilder
& s);
262
264
NBNetBuilder
&
operator=
(
const
NBNetBuilder
& s);
265
266
};
267
268
269
#endif
270
271
/****************************************************************************/
272
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
netbuild
NBNetBuilder.h
Generated on Sun Jun 16 2013 07:07:51 for SUMO - Simulation of Urban MObility by
1.8.1.2