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-sim.org/
13
// Copyright (C) 2001-2014 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
removeElements =
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
221
static
bool
transformCoordinates
(
Position
& from,
bool
includeInBoundary =
true
,
GeoConvHelper
* from_srs = 0);
222
static
bool
transformCoordinates
(
PositionVector
& from,
bool
includeInBoundary =
true
,
GeoConvHelper
* from_srs = 0);
223
224
225
protected
:
230
class
by_id_sorter
{
231
public
:
233
explicit
by_id_sorter
() { }
234
235
int
operator()
(
const
NBNode
* n1,
const
NBNode
* n2)
const
{
236
return
n1->
getID
() < n2->
getID
();
237
}
238
239
};
240
241
protected
:
243
NBNodeCont
myNodeCont
;
244
246
NBTypeCont
myTypeCont
;
247
249
NBEdgeCont
myEdgeCont
;
250
252
NBTrafficLightLogicCont
myTLLCont
;
253
255
NBDistrictCont
myDistrictCont
;
256
258
bool
myHaveSeenRoundabouts
;
259
261
std::vector<EdgeVector>
myRoundabouts
;
262
264
NBJoinedEdgesMap
myJoinedEdges
;
265
266
private
:
268
void
moveToOrigin
(
GeoConvHelper
& geoConvHelper);
269
270
private
:
272
NBNetBuilder
(
const
NBNetBuilder
& s);
273
275
NBNetBuilder
&
operator=
(
const
NBNetBuilder
& s);
276
277
};
278
279
280
#endif
281
282
/****************************************************************************/
283
tmp
buildd
sumo-0.21.0+dfsg
src
netbuild
NBNetBuilder.h
Generated on Thu Nov 20 2014 19:49:56 for SUMO - Simulation of Urban MObility by
1.8.1.2