SUMO - Simulation of Urban MObility

GUIInternalLane.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Representation of a lane over a junction
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright (C) 2001-2011 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUIInternalLane_h
00020 #define GUIInternalLane_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
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/Position.h>
00037 #include <utils/geom/PositionVector.h>
00038 
00039 
00040 // ===========================================================================
00041 // class declarations
00042 // ===========================================================================
00043 class MSVehicle;
00044 class MSNet;
00045 class MFXMutex;
00046 
00047 
00048 // ===========================================================================
00049 // class definitions
00050 // ===========================================================================
00057 class GUIInternalLane : public MSInternalLane {
00058 public:
00074     GUIInternalLane(const std::string& id, SUMOReal maxSpeed,
00075                     SUMOReal length, MSEdge* const edge, unsigned int numericalID,
00076                     const PositionVector& shape, SUMOReal width,
00077                     const SUMOVehicleClasses& allowed,
00078                     const SUMOVehicleClasses& disallowed) throw();
00079 
00080 
00082     ~GUIInternalLane() throw();
00083 
00084 
00085 
00088 
00098     const VehCont& getVehiclesSecure() const throw();
00099 
00100 
00106     void releaseVehicles() const throw();
00108 
00109 
00110 
00113 
00116     bool moveCritical(SUMOTime t);
00117 
00120     bool setCritical(SUMOTime t, std::vector<MSLane*> &into);
00121 
00124     bool integrateNewVehicle(SUMOTime t);
00126 
00127     GUILaneWrapper* buildLaneWrapper(unsigned int index);
00128 
00129     void detectCollisions(SUMOTime timestep);
00130     MSVehicle* removeVehicle(MSVehicle* remVehicle);
00131 
00132 protected:
00134     void swapAfterLaneChange(SUMOTime t);
00135 
00147     virtual void incorporateVehicle(MSVehicle* veh, SUMOReal pos, SUMOReal speed,
00148                                     const MSLane::VehCont::iterator& at,
00149                                     MSMoveReminder::Notification notification = MSMoveReminder::NOTIFICATION_DEPARTED) throw(ProcessError);
00150 
00151 
00152 private:
00154     mutable MFXMutex myLock;
00155 
00156 };
00157 
00158 
00159 #endif
00160 
00161 /****************************************************************************/
00162 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines