Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MeanDataHandler.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-2025 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 meanMeanData elements loading
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include "CommonHandler.h"
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
28
30
31public:
33 MeanDataHandler(const std::string& filename);
34
36 virtual ~MeanDataHandler();
37
40
42 void endParseAttributes();
43
46
48 virtual bool postParserTasks() = 0;
49
52
54 virtual bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,
55 const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,
56 const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,
57 const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,
58 const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,
59 const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,
60 const double speedThreshold) = 0;
61
63 virtual bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,
64 const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,
65 const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,
66 const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,
67 const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,
68 const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,
69 const double speedThreshold) = 0;
70
72
73private:
76
78 void parseEdgeMeanData(const SUMOSAXAttributes& attrs);
79
81 void parseLaneMeanData(const SUMOSAXAttributes& attrs);
82
84
86 bool checkType(const SumoXMLTag currentTag, const std::string& id, const std::string& type);
87
89 MeanDataHandler() = delete;
90
92 MeanDataHandler(const MeanDataHandler& s) = delete;
93
96};
long long int SUMOTime
Definition GUI.h:36
SumoXMLTag
Numbers representing SUMO-XML - element names.
The XML-Handler for network loading.
bool beginParseAttributes(SumoXMLTag tag, const SUMOSAXAttributes &attrs)
begin parse attributes
void endParseAttributes()
end parse attributes
MeanDataHandler & operator=(const MeanDataHandler &s)=delete
invalidate assignment operator
bool checkType(const SumoXMLTag currentTag, const std::string &id, const std::string &type)
check mean data type
MeanDataHandler(const MeanDataHandler &s)=delete
invalidate copy constructor
MeanDataHandler()=delete
invalidate default onstructor
void parseEdgeMeanData(const SUMOSAXAttributes &attrs)
parse edgeMeanData attributes
virtual ~MeanDataHandler()
Destructor.
void parseLaneMeanData(const SUMOSAXAttributes &attrs)
parse laneMeanData attributes
virtual bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &ID, const std::string &file, const std::string &type, const SUMOTime period, const SUMOTime begin, const SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edges, const std::string &edgeFile, const std::string &excludeEmpty, const bool withInternal, const std::vector< std::string > &detectPersons, const double minSamples, const double maxTravelTime, const std::vector< std::string > &vTypes, const double speedThreshold)=0
Builds edgeMeanData.
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
virtual bool postParserTasks()=0
run post parser tasks
virtual bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &ID, const std::string &file, const std::string &type, const SUMOTime period, const SUMOTime begin, const SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edges, const std::string &edgeFile, const std::string &excludeEmpty, const bool withInternal, const std::vector< std::string > &detectPersons, const double minSamples, const double maxTravelTime, const std::vector< std::string > &vTypes, const double speedThreshold)=0
Builds laneMeanData.
Encapsulated SAX-Attributes.