Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
METypeHandler.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-2026 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 meso edge types
19// This is a dedicated handler because meso types must be loaded from additional
20// files before any other objects are loaded from them
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
26
27// ===========================================================================
28// class definitions
29// ===========================================================================
30
31class MSNet;
32
38
39public:
49 METypeHandler(const std::string& file, MSNet& net);
50
51
53 virtual ~METypeHandler();
54
55 bool haveSeenMesoEdgeType() const {
57 }
58
59
60protected:
62
63
72 void myStartElement(int element, const SUMOSAXAttributes& attrs);
73
74
82 void myEndElement(int element);
84
85
86protected:
90 void addMesoEdgeType(const SUMOSAXAttributes& attrs);
91
92
93protected:
96
98 std::string myCurrentTypeID;
99
102
103private:
106
109
110};
void myEndElement(int element)
Called when a closing tag occurs.
std::string myCurrentTypeID
The id of the currently processed edge type.
METypeHandler(const METypeHandler &s)
bool haveSeenMesoEdgeType() const
METypeHandler(const std::string &file, MSNet &net)
Constructor.
MSNet & myNet
The net to fill (preinitialised).
virtual ~METypeHandler()
Destructor.
METypeHandler & operator=(const METypeHandler &s)
void addMesoEdgeType(const SUMOSAXAttributes &attrs)
Loads edge type specific meso parameters.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
bool myHaveSeenMesoEdgeType
whether edge type specific meso parameters were loaded
The simulated network and simulation perfomer.
Definition MSNet.h:89
Encapsulated SAX-Attributes.
SUMOSAXHandler(const std::string &file="", const std::string &expectedRoot="")
Constructor.