Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NLNetShapeHandler.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 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/****************************************************************************/
18// The XML-Handler for loading secondary network shapes
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declarations
27// ===========================================================================
28
29
30// ===========================================================================
31// class definitions
32// ===========================================================================
33
34
44
45public:
51 NLNetShapeHandler(const std::string& file, MSNet& net);
52
53
55 virtual ~NLNetShapeHandler();
56
58 void sortInternalShapes();
59
60protected:
62
63
72 virtual void myStartElement(int element,
73 const SUMOSAXAttributes& attrs);
74
76
77
78private:
79
81 void addLane(const SUMOSAXAttributes& attrs);
82
84 void addJunction(const SUMOSAXAttributes& attrs);
85
87 void addConnection(const SUMOSAXAttributes& attrs);
88
89protected:
92
94 std::map<const MSJunction*, std::map<MSLane*, MSLane*> > myShuffledJunctions;
95
97 std::set<const MSEdge*> myPrimaryEdges;
98
99private:
102
105
106};
The simulated network and simulation perfomer.
Definition MSNet.h:89
The XML-Handler for network loading.
void sortInternalShapes()
resolve mismatch between internal lane ids of both networks
void addConnection(const SUMOSAXAttributes &attrs)
records connection topology for later resorting
void addLane(const SUMOSAXAttributes &attrs)
adds a secondary lane shape
std::map< const MSJunction *, std::map< MSLane *, MSLane * > > myShuffledJunctions
mapping between primary internal lane and corresponding secondary internal lane
std::set< const MSEdge * > myPrimaryEdges
lanes of the primary network that should receive a secondary shape
NLNetShapeHandler & operator=(const NLNetShapeHandler &s)
virtual ~NLNetShapeHandler()
Destructor.
NLNetShapeHandler(const NLNetShapeHandler &s)
MSNet & myNet
The net to fill (preinitialised)
void addJunction(const SUMOSAXAttributes &attrs)
adds a junction position
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.