Eclipse SUMO - Simulation of Urban MObility
MSJunctionControl.cpp
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 // Container for junctions; performs operations on all stored junctions
18 /****************************************************************************/
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <algorithm>
27 #include "MSInternalJunction.h"
28 #include "MSJunctionControl.h"
29 
30 
31 // ===========================================================================
32 // member method definitions
33 // ===========================================================================
35 }
36 
37 
39 }
40 
41 
42 void
44  // initialize normal junctions before internal junctions
45  // (to allow calling getIndex() during initialization of internal junction links)
46  for (const auto& i : *this) {
47  if (i.second->getType() != NODETYPE_INTERNAL) {
48  i.second->postloadInit();
49  }
50  }
51  for (const auto& i : *this) {
52  if (i.second->getType() == NODETYPE_INTERNAL) {
53  i.second->postloadInit();
54  }
55  }
56 }
57 
58 
59 /****************************************************************************/
60 
MSJunctionControl::~MSJunctionControl
~MSJunctionControl()
Destructor.
Definition: MSJunctionControl.cpp:38
MSJunctionControl::postloadInitContainer
void postloadInitContainer()
Closes building of junctions.
Definition: MSJunctionControl.cpp:43
NODETYPE_INTERNAL
Definition: SUMOXMLDefinitions.h:1063
MSJunctionControl.h
MSInternalJunction.h
MSJunctionControl::MSJunctionControl
MSJunctionControl()
Constructor.
Definition: MSJunctionControl.cpp:34
config.h