GUIInternalLane.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GUIInternalLane_h
00020 #define GUIInternalLane_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 <string>
00033 #include <utility>
00034 #include <microsim/MSInternalLane.h>
00035 #include <microsim/MSEdge.h>
00036 #include <utils/geom/Position2D.h>
00037 #include <utils/geom/Position2DVector.h>
00038 #include <utils/foxtools/MFXMutex.h>
00039
00040
00041
00042
00043
00044 class MSVehicle;
00045 class MSNet;
00046
00047
00048
00049
00050
00057 class GUIInternalLane : public MSInternalLane {
00058 public:
00072 GUIInternalLane(const std::string &id, SUMOReal maxSpeed,
00073 SUMOReal length, MSEdge * const edge, unsigned int numericalID,
00074 const Position2DVector &shape,
00075 const std::vector<SUMOVehicleClass> &allowed,
00076 const std::vector<SUMOVehicleClass> &disallowed) throw();
00077
00078
00080 ~GUIInternalLane() throw();
00081
00082
00083
00086
00099 virtual bool isEmissionSuccess(MSVehicle* vehicle, SUMOReal speed, SUMOReal pos,
00100 bool recheckNextLanes) throw(ProcessError);
00102
00103
00104
00107
00117 const VehCont &getVehiclesSecure() const throw();
00118
00119
00125 void releaseVehicles() const throw();
00127
00128
00129
00132
00135 bool moveCritical(SUMOTime t);
00136
00139 bool setCritical(SUMOTime t, std::vector<MSLane*> &into);
00140
00143 bool integrateNewVehicle(SUMOTime t);
00145
00146 GUILaneWrapper *buildLaneWrapper(GUIGlObjectStorage &idStorage);
00147
00148 void detectCollisions(SUMOTime timestep);
00149 MSVehicle *removeFirstVehicle();
00150 MSVehicle *removeVehicle(MSVehicle *remVehicle);
00151
00152 protected:
00155 bool push(MSVehicle* veh);
00156
00157 MSVehicle* pop(SUMOTime t);
00158
00160 void swapAfterLaneChange(SUMOTime t);
00161
00162 private:
00164 mutable MFXMutex myLock;
00165
00166 };
00167
00168
00169 #endif
00170
00171
00172