Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSRightOfWayJunction.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// A junction with right-of-way - rules
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include "MSLogicJunction.h"
26#include <bitset>
27#include <vector>
28#include <string>
29
30
31// ===========================================================================
32// class declarations
33// ===========================================================================
34class MSLane;
35class MSJunctionLogic;
36
37
38// ===========================================================================
39// class definitions
40// ===========================================================================
50public:
59 MSRightOfWayJunction(const std::string& id, SumoXMLNodeType type, const Position& position,
60 const PositionVector& shape,
61 const std::string& name,
62 std::vector<MSLane*> incoming,
63 std::vector<MSLane*> internal,
64 MSJunctionLogic* logic);
65
67 virtual ~MSRightOfWayJunction();
68
69 void postloadInit();
70
71 const std::vector<MSLink*>& getFoeLinks(const MSLink* const srcLink) const {
72 return myLinkFoeLinks.find(srcLink)->second;
73 }
74
75 const std::vector<MSLane*>& getFoeInternalLanes(const MSLink* const srcLink) const {
76 return myLinkFoeInternalLanes.find(srcLink)->second;
77 }
78
79 // @brief return the underlying right-of-way and conflict matrix
80 const MSJunctionLogic* getLogic() const {
81 return myLogic;
82 }
83
84protected:
87
88 // TODO: Documentation
89 std::map<const MSLink*, std::vector<MSLink*> > myLinkFoeLinks;
90 std::map<const MSLink*, std::vector<MSLane*> > myLinkFoeInternalLanes;
91
92
93private:
96
99
100};
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
Representation of a lane in the micro simulation.
Definition MSLane.h:84
A junction with right-of-way - rules.
const std::vector< MSLane * > & getFoeInternalLanes(const MSLink *const srcLink) const
MSJunctionLogic * myLogic
std::map< const MSLink *, std::vector< MSLane * > > myLinkFoeInternalLanes
void postloadInit()
initialises the junction after the whole net has been loaded
MSRightOfWayJunction(const MSRightOfWayJunction &)
Invalidated copy constructor.
std::map< const MSLink *, std::vector< MSLink * > > myLinkFoeLinks
const std::vector< MSLink * > & getFoeLinks(const MSLink *const srcLink) const
const MSJunctionLogic * getLogic() const
MSRightOfWayJunction & operator=(const MSRightOfWayJunction &)
Invalidated assignment operator.
virtual ~MSRightOfWayJunction()
Destructor.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
A list of positions.