Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMeanDataHandler.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-2024 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// Builds meanData objects for netedit
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25
26// ===========================================================================
27// class declarations
28// ===========================================================================
29class GNENet;
30
31// ===========================================================================
32// class definitions
33// ===========================================================================
34
37
38public:
40 GNEMeanDataHandler(GNENet* net, const bool allowUndoRedo, const bool overwrite);
41
43 virtual ~GNEMeanDataHandler();
44
46 bool postParserTasks();
47
51 bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id,
52 const std::string& file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles,
53 const std::vector<std::string>& writtenAttributes, const bool aggregate, const std::vector<std::string>& edgeIDs,
54 const std::string& edgeFile, std::string excludeEmpty, const bool withInternal,
55 const std::vector<std::string>& detectPersons, const double minSamples, const double maxTravelTime,
56 const std::vector<std::string>& vTypes, const double speedThreshold);
57
59 bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& id,
60 const std::string& file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles,
61 const std::vector<std::string>& writtenAttributes, const bool aggregate, const std::vector<std::string>& edgeIDs,
62 const std::string& edgeFile, std::string excludeEmpty, const bool withInternal,
63 const std::vector<std::string>& detectPersons, const double minSamples, const double maxTravelTime,
64 const std::vector<std::string>& vTypes, const double speedThreshold);
65
67
68protected:
71
73 const bool myAllowUndoRedo;
74
76 const bool myOverwrite;
77
79 std::vector<GNEEdge*> parseEdges(const SumoXMLTag tag, const std::vector<std::string>& edgeIDs);
80
82 std::vector<SumoXMLAttr> parseAttributes(const SumoXMLTag tag, const std::vector<std::string>& attrStrs);
83
85 bool checkDuplicatedMeanDataElement(const SumoXMLTag tag, const std::string& id);
86
87private:
90
93};
long long int SUMOTime
Definition GUI.h:36
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool buildLaneMeanData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edgeIDs, const std::string &edgeFile, 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)
Builds laneMeanData.
GNEMeanDataHandler(const GNEMeanDataHandler &s)=delete
invalidate copy constructor
bool postParserTasks()
run post parser tasks
std::vector< SumoXMLAttr > parseAttributes(const SumoXMLTag tag, const std::vector< std::string > &attrStrs)
parse attributes
bool buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &id, const std::string &file, SUMOTime period, SUMOTime begin, SUMOTime end, const bool trackVehicles, const std::vector< std::string > &writtenAttributes, const bool aggregate, const std::vector< std::string > &edgeIDs, const std::string &edgeFile, 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)
const bool myOverwrite
check if overwrite
bool checkDuplicatedMeanDataElement(const SumoXMLTag tag, const std::string &id)
check if given ID correspond to a duplicated mean data element
virtual ~GNEMeanDataHandler()
Destructor.
const bool myAllowUndoRedo
allow undo/redo
std::vector< GNEEdge * > parseEdges(const SumoXMLTag tag, const std::vector< std::string > &edgeIDs)
parse edges
GNEMeanDataHandler & operator=(const GNEMeanDataHandler &s)=delete
invalidate assignment operator
GNENet * myNet
pointer to GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
The XML-Handler for network loading.