GUILane.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GUILane_h
00020 #define GUILane_h
00021
00022
00023
00024
00025
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031
00032 #include <fx.h>
00033 #include <string>
00034 #include <utility>
00035 #include <microsim/MSLane.h>
00036 #include <microsim/MSEdge.h>
00037 #include <utils/geom/Position2D.h>
00038 #include <utils/geom/Position2DVector.h>
00039 #include "GUILaneWrapper.h"
00040 #include <utils/foxtools/MFXMutex.h>
00041
00042
00043
00044
00045
00046 class MSVehicle;
00047 class MSNet;
00048
00049
00050
00051
00052
00061 class GUILane : public MSLane {
00062 public:
00075 GUILane(const std::string &id, SUMOReal maxSpeed,
00076 SUMOReal length, MSEdge * const edge, unsigned int numericalID,
00077 const Position2DVector &shape,
00078 const std::vector<SUMOVehicleClass> &allowed,
00079 const std::vector<SUMOVehicleClass> &disallowed) throw();
00080
00081
00083 ~GUILane() throw();
00084
00085
00086
00089
00102 virtual bool isEmissionSuccess(MSVehicle* vehicle, SUMOReal speed, SUMOReal pos,
00103 bool recheckNextLanes) throw(ProcessError);
00105
00106
00107
00110
00120 const VehCont &getVehiclesSecure() const throw();
00121
00122
00128 void releaseVehicles() const throw();
00130
00131
00132
00135
00138 bool moveCritical(SUMOTime t);
00139
00142 bool setCritical(SUMOTime t, std::vector<MSLane*> &into);
00143
00146 bool integrateNewVehicle(SUMOTime t);
00148
00149
00150
00151 void detectCollisions(SUMOTime timestep);
00152
00153
00154 GUILaneWrapper *buildLaneWrapper(GUIGlObjectStorage &idStorage);
00155 MSVehicle *removeFirstVehicle();
00156 MSVehicle *removeVehicle(MSVehicle *remVehicle);
00157
00158 protected:
00161 bool push(MSVehicle* veh);
00162
00163 MSVehicle* pop(SUMOTime t);
00164
00166 void swapAfterLaneChange(SUMOTime t);
00167
00168 private:
00170 mutable MFXMutex myLock;
00171
00172
00173 };
00174
00175
00176 #endif
00177
00178
00179