/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file MeanDataHandler.h14/// @author Pablo Alvarez Lopez15/// @date Nov 202216///17// The XML-Handler for meanMeanData elements loading18/****************************************************************************/19#pragma once20#include <config.h>2122#include "CommonHandler.h"2324// ===========================================================================25// class definitions26// ===========================================================================2728class MeanDataHandler : public CommonHandler {2930public:31/**@brief Constructor32* @param[in] bucket FileBucket in which place the element33*/34MeanDataHandler(FileBucket* fileBucket);3536/// @brief Destructor37virtual ~MeanDataHandler();3839/// @brief begin parse attributes40bool beginParseAttributes(SumoXMLTag tag, const SUMOSAXAttributes& attrs);4142/// @brief end parse attributes43void endParseAttributes();4445/// @brief parse SumoBaseObject (it's called recursivelly)46void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject* obj);4748/// @name build functions49/// @{5051/// @brief Builds edgeMeanData52virtual bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,53const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,54const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,55const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,56const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,57const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,58const double speedThreshold) = 0;5960/// @brief Builds laneMeanData61virtual bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& ID,62const std::string& file, const std::string& type, const SUMOTime period, const SUMOTime begin,63const SUMOTime end, const bool trackVehicles, const std::vector<std::string>& writtenAttributes,64const bool aggregate, const std::vector<std::string>& edges, const std::string& edgeFile,65const std::string& excludeEmpty, const bool withInternal, const std::vector<std::string>& detectPersons,66const double minSamples, const double maxTravelTime, const std::vector<std::string>& vTypes,67const double speedThreshold) = 0;6869/// @}7071private:72/// @name parse meanMeanData attributes73/// @{7475/// @brief parse edgeMeanData attributes76void parseEdgeMeanData(const SUMOSAXAttributes& attrs);7778/// @brief parse laneMeanData attributes79void parseLaneMeanData(const SUMOSAXAttributes& attrs);8081/// @}8283/// @brief check mean data type84bool checkType(const SumoXMLTag currentTag, const std::string& id, const std::string& type);8586/// @brief invalidate default onstructor87MeanDataHandler() = delete;8889/// @brief invalidate copy constructor90MeanDataHandler(const MeanDataHandler& s) = delete;9192/// @brief invalidate assignment operator93MeanDataHandler& operator=(const MeanDataHandler& s) = delete;94};959697