SUMO - Simulation of Urban MObility

MSJunction.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The base class for an intersection
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 MSJunction_h
00020 #define MSJunction_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 <vector>
00034 #include <map>
00035 #include <utils/geom/Position.h>
00036 #include <utils/geom/PositionVector.h>
00037 #include <utils/common/SUMOTime.h>
00038 #include <utils/common/UtilExceptions.h>
00039 
00040 
00041 class MSVehicle;
00042 class MSLink;
00043 class MSLane;
00044 
00045 // ===========================================================================
00046 // class definitions
00047 // ===========================================================================
00052 class MSJunction {
00053 public:
00055     virtual ~MSJunction();
00056 
00062     MSJunction(const std::string& id, const Position& position,
00063                const PositionVector& shape) throw();
00064 
00067     virtual void postloadInit() throw(ProcessError);
00068 
00069 
00071     const Position& getPosition() const;
00072 
00074     const std::string& getID() const;
00075 
00079     const PositionVector& getShape() const throw() {
00080         return myShape;
00081     }
00082 
00083     virtual const std::vector<MSLink*> &getFoeLinks(const MSLink* const /*srcLink*/) const throw() {
00084         return myEmptyLinks;
00085     }
00086 
00087     virtual const std::vector<MSLane*> &getFoeInternalLanes(const MSLink* const /*srcLink*/) const throw() {
00088         return myEmptyLanes;
00089     }
00090 
00091 protected:
00093     std::string myID;
00094 
00096     Position myPosition;
00097 
00099     PositionVector myShape;
00100 
00101     std::vector<MSLink*> myEmptyLinks;
00102     std::vector<MSLane*> myEmptyLanes;
00103 
00104 
00105 
00106 
00107 private:
00109     MSJunction(const MSJunction&);
00110 
00112     MSJunction& operator=(const MSJunction&);
00113 
00114 };
00115 
00116 
00117 #endif
00118 
00119 /****************************************************************************/
00120 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines