GUILane.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // Representation of a lane in the micro simulation (gui-version)
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 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 GUILane_h
00020 #define GUILane_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 <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 // class declarations
00045 // ===========================================================================
00046 class MSVehicle;
00047 class MSNet;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
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 

Generated on Wed May 5 00:06:30 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6