|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Representation of a lane over a junction 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef GUIInternalLane_h 00023 #define GUIInternalLane_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <utility> 00037 #include <microsim/MSInternalLane.h> 00038 #include <microsim/MSEdge.h> 00039 #include <utils/geom/Position.h> 00040 #include <utils/geom/PositionVector.h> 00041 00042 00043 // =========================================================================== 00044 // class declarations 00045 // =========================================================================== 00046 class MSVehicle; 00047 class MSNet; 00048 class MFXMutex; 00049 00050 00051 // =========================================================================== 00052 // class definitions 00053 // =========================================================================== 00060 class GUIInternalLane : public MSInternalLane { 00061 public: 00077 GUIInternalLane(const std::string& id, SUMOReal maxSpeed, 00078 SUMOReal length, MSEdge* const edge, unsigned int numericalID, 00079 const PositionVector& shape, SUMOReal width, 00080 const SUMOVehicleClasses& allowed, 00081 const SUMOVehicleClasses& disallowed) ; 00082 00083 00085 ~GUIInternalLane() ; 00086 00087 00088 00091 00101 const VehCont& getVehiclesSecure() const ; 00102 00103 00109 void releaseVehicles() const ; 00111 00112 00113 00116 00119 bool moveCritical(SUMOTime t); 00120 00123 bool setCritical(SUMOTime t, std::vector<MSLane*> &into); 00124 00127 bool integrateNewVehicle(SUMOTime t); 00129 00130 GUILaneWrapper* buildLaneWrapper(unsigned int index); 00131 00132 void detectCollisions(SUMOTime timestep); 00133 MSVehicle* removeVehicle(MSVehicle* remVehicle); 00134 00135 protected: 00137 void swapAfterLaneChange(SUMOTime t); 00138 00150 virtual void incorporateVehicle(MSVehicle* veh, SUMOReal pos, SUMOReal speed, 00151 const MSLane::VehCont::iterator& at, 00152 MSMoveReminder::Notification notification = MSMoveReminder::NOTIFICATION_DEPARTED) ; 00153 00154 00155 private: 00157 mutable MFXMutex myLock; 00158 00159 }; 00160 00161 00162 #endif 00163 00164 /****************************************************************************/ 00165