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-2022 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
20
// Container for junctions; performs operations on all stored junctions
21
/****************************************************************************/
22
#include <config.h>
23
24
#include <algorithm>
25
#include "
MSInternalJunction.h
"
26
#include "
MSJunctionControl.h
"
27
28
29
// ===========================================================================
30
// member method definitions
31
// ===========================================================================
32
MSJunctionControl::MSJunctionControl
() {
33
}
34
35
36
MSJunctionControl::~MSJunctionControl
() {
37
}
38
39
40
void
41
MSJunctionControl::postloadInitContainer
() {
42
// initialize normal junctions before internal junctions
43
// (to allow calling getIndex() during initialization of internal junction links)
44
for
(
const
auto
& i : *
this
) {
45
if
(i.second->getType() !=
SumoXMLNodeType::INTERNAL
) {
46
i.second->postloadInit();
47
}
48
}
49
for
(
const
auto
& i : *
this
) {
50
if
(i.second->getType() ==
SumoXMLNodeType::INTERNAL
) {
51
i.second->postloadInit();
52
}
53
}
54
}
55
56
57
/****************************************************************************/
MSInternalJunction.h
MSJunctionControl.h
SumoXMLNodeType::INTERNAL
@ INTERNAL
MSJunctionControl::MSJunctionControl
MSJunctionControl()
Constructor.
Definition:
MSJunctionControl.cpp:32
MSJunctionControl::postloadInitContainer
void postloadInitContainer()
Closes building of junctions.
Definition:
MSJunctionControl.cpp:41
MSJunctionControl::~MSJunctionControl
~MSJunctionControl()
Destructor.
Definition:
MSJunctionControl.cpp:36
src
microsim
MSJunctionControl.cpp
Generated on Wed Dec 14 2022 13:59:21 for Eclipse SUMO - Simulation of Urban MObility by
1.9.4