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-2012 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
56
57
// ===========================================================================
58
// class definitions
59
// ===========================================================================
112
class
NBNetBuilder
{
113
friend
class
GNENet
;
// for triggering intermediate build steps
114
115
public
:
117
NBNetBuilder
();
118
120
~NBNetBuilder
();
121
122
131
void
applyOptions
(
OptionsCont
& oc);
132
133
141
void
compute
(
OptionsCont
& oc,
142
const
std::set<std::string>& explicitTurnarounds = std::set<std::string>(),
143
bool
removeUnwishedNodes =
true
);
144
145
146
149
153
NBEdgeCont
&
getEdgeCont
() {
154
return
myEdgeCont
;
155
}
156
157
161
NBNodeCont
&
getNodeCont
() {
162
return
myNodeCont
;
163
}
164
165
169
NBTypeCont
&
getTypeCont
() {
170
return
myTypeCont
;
171
}
172
173
177
NBTrafficLightLogicCont
&
getTLLogicCont
() {
178
return
myTLLCont
;
179
}
180
181
185
NBDistrictCont
&
getDistrictCont
() {
186
return
myDistrictCont
;
187
}
188
189
193
const
std::vector<std::set<NBEdge*> >&
getRoundabouts
()
const
{
194
return
myRoundabouts
;
195
}
196
197
201
const
NBJoinedEdgesMap
&
getJoinedEdgesMap
()
const
{
202
return
myJoinedEdges
;
203
}
205
206
207
protected
:
212
class
by_id_sorter
{
213
public
:
215
explicit
by_id_sorter
() { }
216
217
int
operator()
(
const
NBNode
* n1,
const
NBNode
* n2)
const
{
218
return
n1->
getID
() < n2->
getID
();
219
}
220
221
};
222
223
protected
:
225
NBNodeCont
myNodeCont
;
226
228
NBTypeCont
myTypeCont
;
229
231
NBEdgeCont
myEdgeCont
;
232
234
NBTrafficLightLogicCont
myTLLCont
;
235
237
NBDistrictCont
myDistrictCont
;
238
240
std::vector<std::set<NBEdge*> >
myRoundabouts
;
241
243
NBJoinedEdgesMap
myJoinedEdges
;
244
245
246
private
:
248
NBNetBuilder
(
const
NBNetBuilder
& s);
249
251
NBNetBuilder
&
operator=
(
const
NBNetBuilder
& s);
252
253
};
254
255
256
#endif
257
258
/****************************************************************************/
259
build
buildd
sumo-0.16.0~dfsg
src
netbuild
NBNetBuilder.h
Generated on Tue Apr 16 2013 01:32:18 for SUMO - Simulation of Urban MObility by
1.8.3.1