SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // A junction with right-of-way - rules 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 MSRightOfWayJunction_h 00023 #define MSRightOfWayJunction_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 "MSLogicJunction.h" 00036 #include <bitset> 00037 #include <vector> 00038 #include <string> 00039 00040 00041 // =========================================================================== 00042 // class declarations 00043 // =========================================================================== 00044 class MSLane; 00045 class MSJunctionLogic; 00046 00047 00048 // =========================================================================== 00049 // class definitions 00050 // =========================================================================== 00059 class MSRightOfWayJunction : public MSLogicJunction { 00060 public: 00069 MSRightOfWayJunction(const std::string& id, const Position& position, 00070 const PositionVector& shape, 00071 std::vector<MSLane*> incoming, 00072 #ifdef HAVE_INTERNAL_LANES 00073 std::vector<MSLane*> internal, 00074 #endif 00075 MSJunctionLogic* logic) ; 00076 00078 virtual ~MSRightOfWayJunction(); 00079 00080 void postloadInit() ; 00081 00082 const std::vector<MSLink*> &getFoeLinks(const MSLink* const srcLink) const { 00083 return myLinkFoeLinks.find((MSLink*) srcLink)->second; 00084 } 00085 00086 const std::vector<MSLane*> &getFoeInternalLanes(const MSLink* const srcLink) const { 00087 return myLinkFoeInternalLanes.find((MSLink*) srcLink)->second; 00088 } 00089 00090 00091 protected: 00093 MSJunctionLogic* myLogic; 00094 00095 std::map<MSLink*, std::vector<MSLink*> > myLinkFoeLinks; 00096 std::map<MSLink*, std::vector<MSLane*> > myLinkFoeInternalLanes; 00097 00098 00099 private: 00101 MSRightOfWayJunction(const MSRightOfWayJunction&); 00102 00104 MSRightOfWayJunction& operator=(const MSRightOfWayJunction&); 00105 00106 }; 00107 00108 00109 #endif 00110 00111 /****************************************************************************/ 00112