SUMO - Simulation of Urban MObility
MSJunction.h
Go to the documentation of this file.
00001 /****************************************************************************/
00010 // The base class for an intersection
00011 /****************************************************************************/
00012 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00013 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00014 /****************************************************************************/
00015 //
00016 //   This file is part of SUMO.
00017 //   SUMO is free software: you can redistribute it and/or modify
00018 //   it under the terms of the GNU General Public License as published by
00019 //   the Free Software Foundation, either version 3 of the License, or
00020 //   (at your option) any later version.
00021 //
00022 /****************************************************************************/
00023 #ifndef MSJunction_h
00024 #define MSJunction_h
00025 
00026 
00027 // ===========================================================================
00028 // included modules
00029 // ===========================================================================
00030 #ifdef _MSC_VER
00031 #include <windows_config.h>
00032 #else
00033 #include <config.h>
00034 #endif
00035 
00036 #include <string>
00037 #include <vector>
00038 #include <map>
00039 #include <utils/geom/Position.h>
00040 #include <utils/geom/PositionVector.h>
00041 #include <utils/common/SUMOTime.h>
00042 #include <utils/common/UtilExceptions.h>
00043 
00044 
00045 class MSVehicle;
00046 class MSLink;
00047 class MSLane;
00048 
00049 // ===========================================================================
00050 // class definitions
00051 // ===========================================================================
00056 class MSJunction {
00057 public:
00059     virtual ~MSJunction();
00060 
00066     MSJunction(const std::string& id, const Position& position,
00067                const PositionVector& shape) ;
00068 
00071     virtual void postloadInit() ;
00072 
00073 
00075     const Position& getPosition() const;
00076 
00078     const std::string& getID() const;
00079 
00083     const PositionVector& getShape() const {
00084         return myShape;
00085     }
00086 
00087     virtual const std::vector<MSLink*> &getFoeLinks(const MSLink* const /*srcLink*/) const {
00088         return myEmptyLinks;
00089     }
00090 
00091     virtual const std::vector<MSLane*> &getFoeInternalLanes(const MSLink* const /*srcLink*/) const {
00092         return myEmptyLanes;
00093     }
00094 
00095 protected:
00097     std::string myID;
00098 
00100     Position myPosition;
00101 
00103     PositionVector myShape;
00104 
00105     std::vector<MSLink*> myEmptyLinks;
00106     std::vector<MSLane*> myEmptyLanes;
00107 
00108 
00109 
00110 
00111 private:
00113     MSJunction(const MSJunction&);
00114 
00116     MSJunction& operator=(const MSJunction&);
00117 
00118 };
00119 
00120 
00121 #endif
00122 
00123 /****************************************************************************/
00124 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines