Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
NIXMLConnectionsHandler.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/****************************************************************************/
20// Importer for edge connections stored in XML
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
27
28
29// ===========================================================================
30// class declarations
31// ===========================================================================
32class NBEdge;
33class NBEdgeCont;
34class NBNodeCont;
36class MsgHandler;
37class GeoConvHelper;
38
39
40// ===========================================================================
41// class definitions
42// ===========================================================================
51public:
56
57
60
61
62protected:
64
65
73 void myStartElement(int element,
74 const SUMOSAXAttributes& attrs);
75
82 void myEndElement(int element);
84
85private:
94 NBConnection parseConnectionDef(const std::string& defRole, const std::string& def);
95
96
102 void parseLaneBound(const SUMOSAXAttributes& attrs, NBEdge* from, NBEdge* to);
103
104
112 bool parseLaneInfo(const SUMOSAXAttributes& attributes, NBEdge* fromEdge, NBEdge* toEdge, int* fromLane, int* toLane);
113
114
122 inline bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes& attributes,
123 NBEdge* fromEdge, NBEdge* toEdge,
124 int* fromLane, int* toLane);
125
126
132 inline bool parseLaneDefinition(const SUMOSAXAttributes& attributes, int* fromLane, int* toLane);
133
137 void delConnection(const SUMOSAXAttributes& attrs);
138
142 void parseConnection(const SUMOSAXAttributes& attrs);
143
147 void addCrossing(const SUMOSAXAttributes& attrs);
148
152 void addWalkingArea(const SUMOSAXAttributes& attrs);
153
157 void addProhibition(const SUMOSAXAttributes& attrs);
158private:
161
164
168
171
174
177
180
181private:
184
187
188
189};
static methods for processing the coordinates conversion for the current net
Storage for edges, including some functionality operating on multiple edges.
Definition NBEdgeCont.h:59
The representation of a single edge during network building.
Definition NBEdge.h:92
Container for nodes during the netbuilding process.
Definition NBNodeCont.h:57
A container for traffic light definitions and built programs.
Importer for edge connections stored in XML.
void delConnection(const SUMOSAXAttributes &attrs)
Parses a delete element that specifies a connection to delete.
MsgHandler *const myErrorMsgHandler
the handler for loading errors
void parseConnection(const SUMOSAXAttributes &attrs)
Parses a connection and adds it to the referenced edge.
NIXMLConnectionsHandler(const NIXMLConnectionsHandler &s)
invalidated copy constructor
bool parseLaneInfo(const SUMOSAXAttributes &attributes, NBEdge *fromEdge, NBEdge *toEdge, int *fromLane, int *toLane)
Parses information about lane-2-lane connection when it describes a lane-2-lane relationship.
bool parseLaneDefinition(const SUMOSAXAttributes &attributes, int *fromLane, int *toLane)
Parses information about lane-2-lane connection.
bool myHaveWarnedAboutDeprecatedLanes
Information whether we have a deprecated attribute.
NBTrafficLightLogicCont & myTLLogicCont
The traffic lights container to add built tls to (when invalidating tls)
bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes &attributes, NBEdge *fromEdge, NBEdge *toEdge, int *fromLane, int *toLane)
Parses information about lane-2-lane connection in deprecated format.
void addProhibition(const SUMOSAXAttributes &attrs)
Parses a prohibition and updates the referenced node.
NBEdgeCont & myEdgeCont
The edge container to fill.
void myEndElement(int element)
Called when a closing tag occurs.
void addWalkingArea(const SUMOSAXAttributes &attrs)
Parses a walkingArea and updates the referenced node.
Parameterised * myLastParameterised
last item the could receive parameters
NBConnection parseConnectionDef(const std::string &defRole, const std::string &def)
Returns the connection described by def.
NBNodeCont & myNodeCont
The edge container to fill.
NIXMLConnectionsHandler & operator=(const NIXMLConnectionsHandler &s)
invalidated assignment operator
GeoConvHelper * myLocation
The coordinate transformation which was used compute the custom shape coordinates for connections and...
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void parseLaneBound(const SUMOSAXAttributes &attrs, NBEdge *from, NBEdge *to)
Parses a connection when it describes a lane-2-lane relationship.
void addCrossing(const SUMOSAXAttributes &attrs)
Parses a crossing and updates the referenced node.
An upper class for objects with additional parameters.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.