Eclipse SUMO - Simulation of Urban MObility
MSInternalJunction.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 /****************************************************************************/
16 // junction.
17 /****************************************************************************/
18 #ifndef MSInternalJunction_h
19 #define MSInternalJunction_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <utils/common/StdDefs.h>
28 #include "MSLogicJunction.h"
29 #include <bitset>
30 #include <vector>
31 #include <string>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class MSLane;
38 class MSJunctionLogic;
39 class MSLink;
40 
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
52 public:
60  MSInternalJunction(const std::string& id, SumoXMLNodeType type, const Position& position,
61  const PositionVector& shape,
62  std::vector<MSLane*> incoming, std::vector<MSLane*> internal);
63 
65  virtual ~MSInternalJunction();
66 
67 
68  void postloadInit();
69 
70  const std::vector<MSLink*>& getFoeLinks(const MSLink* const srcLink) const {
71  UNUSED_PARAMETER(srcLink);
72  return myInternalLinkFoes;
73  }
74 
75  const std::vector<MSLane*>& getFoeInternalLanes(const MSLink* const srcLink) const {
76  UNUSED_PARAMETER(srcLink);
77  return myInternalLaneFoes;
78  }
79 
80 private:
81 
82  bool indirectBicycleTurn(const MSLane* specialLane, const MSLink* thisLink, const MSLane* foeFirstPart, const MSLink* foeLink) const;
83 
84  std::vector<MSLink*> myInternalLinkFoes;
85  std::vector<MSLane*> myInternalLaneFoes;
86 
89 
92 
93 };
94 
95 
96 #endif
97 
98 /****************************************************************************/
99 
MSInternalJunction::myInternalLinkFoes
std::vector< MSLink * > myInternalLinkFoes
Definition: MSInternalJunction.h:84
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:31
MSLane
Representation of a lane in the micro simulation.
Definition: MSLane.h:82
MSInternalJunction::postloadInit
void postloadInit()
initialises the junction after the whole net has been loaded
Definition: MSInternalJunction.cpp:53
MSInternalJunction
Definition: MSInternalJunction.h:51
MSInternalJunction::indirectBicycleTurn
bool indirectBicycleTurn(const MSLane *specialLane, const MSLink *thisLink, const MSLane *foeFirstPart, const MSLink *foeLink) const
Definition: MSInternalJunction.cpp:125
PositionVector
A list of positions.
Definition: PositionVector.h:45
MSJunctionLogic
Definition: MSJunctionLogic.h:38
MSInternalJunction::~MSInternalJunction
virtual ~MSInternalJunction()
Destructor.
Definition: MSInternalJunction.cpp:49
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
MSInternalJunction::MSInternalJunction
MSInternalJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane * > incoming, std::vector< MSLane * > internal)
Constructor.
Definition: MSInternalJunction.cpp:39
MSLogicJunction
Definition: MSLogicJunction.h:50
MSInternalJunction::myInternalLaneFoes
std::vector< MSLane * > myInternalLaneFoes
Definition: MSInternalJunction.h:85
config.h
MSInternalJunction::getFoeInternalLanes
const std::vector< MSLane * > & getFoeInternalLanes(const MSLink *const srcLink) const
Definition: MSInternalJunction.h:75
StdDefs.h
MSLogicJunction.h
MSInternalJunction::operator=
MSInternalJunction & operator=(const MSInternalJunction &)
Invalidated assignment operator.
MSInternalJunction::getFoeLinks
const std::vector< MSLink * > & getFoeLinks(const MSLink *const srcLink) const
Definition: MSInternalJunction.h:70