SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIInternalLane.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // Lane within junctions, derived from the normal lane
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 <string>
34 #include <utility>
36 #include <utils/geom/Position.h>
37 #include <microsim/MSLane.h>
40 #include <microsim/MSNet.h>
41 #include "GUINet.h"
42 #include "GUIVehicle.h"
43 #include "GUILaneWrapper.h"
44 #include "GUIInternalLane.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 GUIInternalLane::GUIInternalLane(const std::string& id,
55  SUMOReal maxSpeed, SUMOReal length,
56  MSEdge* const edge, unsigned int numericalID,
57  const PositionVector& shape, SUMOReal width,
58  SVCPermissions permissions) :
59  MSInternalLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions) {}
60 
61 
63  // just to quit cleanly on a failure
64  if (myLock.locked()) {
65  myLock.unlock();
66  }
67 }
68 
69 
70 // ------ Vehicle insertion ------
71 void
73  const MSLane::VehCont::iterator& at,
74  MSMoveReminder::Notification notification) {
76  MSInternalLane::incorporateVehicle(veh, pos, speed, at, notification);
77 }
78 
79 
80 // ------ Access to vehicles ------
81 const MSLane::VehCont&
83  myLock.lock();
84  return myVehicles;
85 }
86 
87 
88 void
90  myLock.unlock();
91 }
92 
93 
94 bool
98 }
99 
100 
101 bool
102 GUIInternalLane::setCritical(SUMOTime t, std::vector<MSLane*>& into) {
104  return MSInternalLane::setCritical(t, into);
105 }
106 
107 
108 MSVehicle*
111  return MSLane::removeVehicle(remVehicle);
112 }
113 
114 
115 void
119 }
120 
121 
122 bool
125  return MSLane::integrateNewVehicle(t);
126 }
127 
128 
131  return new GUILaneWrapper(*this, myShape, index);
132 }
133 
134 
135 void
138  MSLane::detectCollisions(timestep);
139 }
140 
141 
142 
143 /****************************************************************************/
144