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:
35 MeanDataHandler(FileBucket* fileBucket);
36
38 virtual ~MeanDataHandler();
39
42
44 void endParseAttributes();
45
48
51
53 virtual bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,
54 const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,
55 const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,
56 const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,
57 const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,
58 const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,
59 const double speedThreshold) = 0;
60
62 virtual bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,
63 const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,
64 const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,
65 const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,
66 const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,
67 const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,
68 const double speedThreshold) = 0;
69
71
72private:
75
77 void parseEdgeMeanData(const SUMOSAXAttributes& attrs);
78
80 void parseLaneMeanData(const SUMOSAXAttributes& attrs);
81
83
85 bool checkType(const SumoXMLTag currentTag, const std::string& id, const std::string& type);
86
88 MeanDataHandler() = delete;
89
91 MeanDataHandler(const MeanDataHandler& s) = delete;
92
95};
long long int SUMOTime
Definition GUI.h:36
SumoXMLTag
Numbers representing SUMO-XML - element names.
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 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.