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-2023 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;
37
38
39// ===========================================================================
40// class definitions
41// ===========================================================================
50public:
55
56
59
60
61protected:
63
64
72 void myStartElement(int element,
73 const SUMOSAXAttributes& attrs);
75
76private:
85 NBConnection parseConnection(const std::string& defRole, const std::string& def);
86
87
93 void parseLaneBound(const SUMOSAXAttributes& attrs, NBEdge* from, NBEdge* to);
94
95
103 bool parseLaneInfo(const SUMOSAXAttributes& attributes, NBEdge* fromEdge, NBEdge* toEdge, int* fromLane, int* toLane);
104
105
113 inline bool parseDeprecatedLaneDefinition(const SUMOSAXAttributes& attributes,
114 NBEdge* fromEdge, NBEdge* toEdge,
115 int* fromLane, int* toLane);
116
117
123 inline bool parseLaneDefinition(const SUMOSAXAttributes& attributes, int* fromLane, int* toLane);
124
125
129 void addCrossing(const SUMOSAXAttributes& attrs);
130
134 void addWalkingArea(const SUMOSAXAttributes& attrs);
135
136private:
139
142
146
149
152
153private:
156
159
160
161};
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.
MsgHandler *const myErrorMsgHandler
the handler for loading errors
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.
NBEdgeCont & myEdgeCont
The edge container to fill.
NBConnection parseConnection(const std::string &defRole, const std::string &def)
Returns the connection described by def.
void addWalkingArea(const SUMOSAXAttributes &attrs)
Parses a walkingArea and updates the referenced node.
NBNodeCont & myNodeCont
The edge container to fill.
NIXMLConnectionsHandler & operator=(const NIXMLConnectionsHandler &s)
invalidated assignment operator
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.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.