Eclipse SUMO - Simulation of Urban MObility
MSLogicJunction.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 /****************************************************************************/
21 // with one ore more logics.
22 /****************************************************************************/
23 #pragma once
24 #include <config.h>
25 
26 #include "MSJunction.h"
27 #include <utils/common/SUMOTime.h>
28 #include <utils/common/StdDefs.h>
29 #include <bitset>
30 #include <vector>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class MSLane;
37 
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
48 class MSLogicJunction : public MSJunction {
49 public:
50 
51 
53  virtual ~MSLogicJunction();
54 
56  typedef std::bitset<SUMO_MAX_CONNECTIONS> LinkBits;
57 
59  virtual void postloadInit();
60 
63  const std::vector<MSLane*> getInternalLanes() const;
64 
65 protected:
74  MSLogicJunction(const std::string& id,
75  SumoXMLNodeType type,
76  const Position& position,
77  const PositionVector& shape,
78  const std::string& name,
79  std::vector<MSLane*> incoming,
80  std::vector<MSLane*> internal
81  );
82 
83 protected:
85  std::vector<MSLane*> myIncomingLanes;
86 
88  std::vector<MSLane*> myInternalLanes;
89 
90 private:
93 
96 
97 };
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
The base class for an intersection.
Definition: MSJunction.h:58
Representation of a lane in the micro simulation.
Definition: MSLane.h:84
MSLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, const std::string &name, std::vector< MSLane * > incoming, std::vector< MSLane * > internal)
Constructor.
std::vector< MSLane * > myInternalLanes
list of internal lanes
MSLogicJunction(const MSLogicJunction &)
Invalidated copy constructor.
MSLogicJunction & operator=(const MSLogicJunction &)
Invalidated assignment operator.
const std::vector< MSLane * > getInternalLanes() const
Returns all internal lanes on the junction.
virtual void postloadInit()
initialises the junction after the whole net has been loaded
std::bitset< SUMO_MAX_CONNECTIONS > LinkBits
Container for link response and foes.
std::vector< MSLane * > myIncomingLanes
list of incoming lanes
virtual ~MSLogicJunction()
Destructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
A list of positions.