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