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
GUIEdgeControlBuilder.cpp
Go to the documentation of this file.
1
/****************************************************************************/
9
// Derivation of NLEdgeControlBuilder which build gui-edges
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 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
23
24
// ===========================================================================
25
// included modules
26
// ===========================================================================
27
#ifdef _MSC_VER
28
#include <
windows_config.h
>
29
#else
30
#include <
config.h
>
31
#endif
32
33
#include <vector>
34
#include <string>
35
#include <map>
36
#include <algorithm>
37
#include <
guisim/GUIEdge.h
>
38
#include <
guisim/GUINet.h
>
39
#include <
guisim/GUILane.h
>
40
#include <
guisim/GUIInternalLane.h
>
41
#include <
microsim/MSJunction.h
>
42
#include <
netload/NLBuilder.h
>
43
#include "
GUIEdgeControlBuilder.h
"
44
#include <
gui/GUIGlobals.h
>
45
46
#ifdef CHECK_MEMORY_LEAKS
47
#include <
foreign/nvwa/debug_new.h
>
48
#endif // CHECK_MEMORY_LEAKS
49
50
51
// ===========================================================================
52
// method definitions
53
// ===========================================================================
54
GUIEdgeControlBuilder::GUIEdgeControlBuilder
()
55
:
NLEdgeControlBuilder
() {}
56
57
58
GUIEdgeControlBuilder::~GUIEdgeControlBuilder
() {}
59
60
61
MSEdge
*
62
GUIEdgeControlBuilder::closeEdge
() {
63
MSEdge
* ret =
NLEdgeControlBuilder::closeEdge
();
64
static_cast<
GUIEdge
*
>
(ret)->initGeometry();
65
return
ret;
66
}
67
68
69
MSLane
*
70
GUIEdgeControlBuilder::addLane
(
const
std::string&
id
,
71
SUMOReal
maxSpeed,
SUMOReal
length,
72
const
PositionVector
& shape,
73
SUMOReal
width,
74
SVCPermissions
permissions) {
75
MSLane
* lane = 0;
76
switch
(
myFunction
) {
77
case
MSEdge::EDGEFUNCTION_INTERNAL
:
78
lane =
new
GUIInternalLane
(
id
, maxSpeed, length,
myActiveEdge
,
79
myCurrentNumericalLaneID
++, shape, width, permissions);
80
break
;
81
case
MSEdge::EDGEFUNCTION_NORMAL
:
82
case
MSEdge::EDGEFUNCTION_CONNECTOR
:
83
lane =
new
GUILane
(
id
, maxSpeed, length,
myActiveEdge
,
84
myCurrentNumericalLaneID
++, shape, width, permissions);
85
break
;
86
default
:
87
throw
InvalidArgument
(
"A lane with an unknown type occured ("
+
toString
(
myFunction
) +
")"
);
88
}
89
myLaneStorage
->push_back(lane);
90
return
lane;
91
}
92
93
94
95
MSEdge
*
96
GUIEdgeControlBuilder::buildEdge
(
const
std::string&
id
,
const
std::string& streetName) {
97
return
new
GUIEdge
(
id
,
myCurrentNumericalEdgeID
++, streetName);
98
}
99
100
/****************************************************************************/
101
var
build
temp
tmp.znCyBrHNjL
4.0-0-0
sumo
sumo-0.15.0~dfsg
src
guinetload
GUIEdgeControlBuilder.cpp
Generated on Mon Mar 24 2014 09:53:09 for SUMO - Simulation of Urban MObility by
1.8.1.2