SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MSNoLogicJunction.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // -------------------
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2002-2015 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "MSNoLogicJunction.h"
34 #include "MSLane.h"
35 #include <algorithm>
36 #include <cassert>
37 #include <cmath>
38 
39 #ifdef CHECK_MEMORY_LEAKS
40 #include <foreign/nvwa/debug_new.h>
41 #endif // CHECK_MEMORY_LEAKS
42 
43 
44 // ===========================================================================
45 // static member definitions
46 // ===========================================================================
47 
48 // ===========================================================================
49 // method definitions
50 // ===========================================================================
52  SumoXMLNodeType type,
53  const Position& position,
54  const PositionVector& shape,
55  std::vector<MSLane*> incoming
57  , std::vector<MSLane*> internal
58 #endif
59  ):
60  MSJunction(id, type, position, shape),
61  myIncomingLanes(incoming)
62 #ifdef HAVE_INTERNAL_LANES
63  , myInternalLanes(internal)
64 #endif
65 {}
66 
67 
69 
70 
71 void
73  std::vector<MSLane*>::iterator i;
74  // inform links where they have to report approaching vehicles to
75  for (i = myIncomingLanes.begin(); i != myIncomingLanes.end(); ++i) {
76  const MSLinkCont& links = (*i)->getLinkCont();
77  for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
78  (*j)->setRequestInformation(-1, false, false, std::vector<MSLink*>(), std::vector<MSLane*>());
79  }
80  }
81 }
82 
83 
84 
85 /****************************************************************************/
86 
std::vector< MSLane * > myIncomingLanes
The base class for an intersection.
Definition: MSJunction.h:61
virtual ~MSNoLogicJunction()
Destructor.
MSNoLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane * > incoming)
Constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
#define HAVE_INTERNAL_LANES
Definition: config.h:50