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.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // with one ore more logics.
18 /****************************************************************************/
19 #ifndef MSLogicJunction_h
20 #define MSLogicJunction_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include "MSJunction.h"
29 #include <utils/common/SUMOTime.h>
30 #include <utils/common/StdDefs.h>
31 #include <bitset>
32 #include <vector>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class MSLane;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
50 class MSLogicJunction : public MSJunction {
51 public:
52 
53 
55  virtual ~MSLogicJunction();
56 
58  typedef std::bitset<SUMO_MAX_CONNECTIONS> LinkBits;
59 
61  virtual void postloadInit();
62 
65  const std::vector<MSLane*> getInternalLanes() const;
66 
67 protected:
76  MSLogicJunction(const std::string& id,
77  SumoXMLNodeType type,
78  const Position& position,
79  const PositionVector& shape,
80  std::vector<MSLane*> incoming,
81  std::vector<MSLane*> internal
82  );
83 
84 protected:
86  std::vector<MSLane*> myIncomingLanes;
87 
89  std::vector<MSLane*> myInternalLanes;
90 
91 private:
94 
97 
98 };
99 
100 
101 #endif
102 
103 /****************************************************************************/
104 
MSLogicJunction::MSLogicJunction
MSLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane * > incoming, std::vector< MSLane * > internal)
Constructor.
Definition: MSLogicJunction.cpp:36
SUMOTime.h
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
MSJunction
The base class for an intersection.
Definition: MSJunction.h:60
MSLogicJunction::myInternalLanes
std::vector< MSLane * > myInternalLanes
list of internal lanes
Definition: MSLogicJunction.h:89
PositionVector
A list of positions.
Definition: PositionVector.h:45
MSLogicJunction::myIncomingLanes
std::vector< MSLane * > myIncomingLanes
list of incoming lanes
Definition: MSLogicJunction.h:86
MSJunction.h
SumoXMLNodeType
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
Definition: SUMOXMLDefinitions.h:1054
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
MSLogicJunction::operator=
MSLogicJunction & operator=(const MSLogicJunction &)
Invalidated assignment operator.
MSLogicJunction::getInternalLanes
const std::vector< MSLane * > getInternalLanes() const
Returns all internal lanes on the junction.
Definition: MSLogicJunction.cpp:82
MSLogicJunction
Definition: MSLogicJunction.h:50
MSLogicJunction::~MSLogicJunction
virtual ~MSLogicJunction()
Destructor.
Definition: MSLogicJunction.cpp:49
config.h
StdDefs.h
MSLogicJunction::LinkBits
std::bitset< SUMO_MAX_CONNECTIONS > LinkBits
Container for link response and foes.
Definition: MSLogicJunction.h:58
MSLogicJunction::postloadInit
virtual void postloadInit()
initialises the junction after the whole net has been loaded
Definition: MSLogicJunction.cpp:53