Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDataHandler.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 data 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:
45 GNEDataHandler(GNENet* net, const std::string& file, const bool allowUndoRedo, const bool overwrite);
46
49
51 bool postParserTasks();
52
55
58 bool buildDataSet(const std::string& id);
59
66 bool buildDataInterval(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& dataSetID,
67 const double begin, const double end);
68
74 bool buildEdgeData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& edgeID,
75 const Parameterised::Map& parameters);
76
83 bool buildEdgeRelationData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& fromEdgeID,
84 const std::string& toEdgeID, const Parameterised::Map& parameters);
85
92 bool buildTAZRelationData(const CommonXMLStructure::SumoBaseObject* sumoBaseObject, const std::string& fromTAZID,
93 const std::string& toTAZID, const Parameterised::Map& parameters);
95
96protected:
99
101 const bool myAllowUndoRedo;
102
104 const bool myOverwrite;
105
107 bool checkDuplicatedDataSet(const std::string& id);
108
109private:
111 GNEDataHandler(const GNEDataHandler& s) = delete;
112
115};
The XML-Handler for network loading.
Definition DataHandler.h:36
~GNEDataHandler()
Destructor.
bool buildDataInterval(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &dataSetID, const double begin, const double end)
Builds DataInterval.
bool buildTAZRelationData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &fromTAZID, const std::string &toTAZID, const Parameterised::Map &parameters)
Builds TAZRelationData.
bool buildDataSet(const std::string &id)
Builds DataSet (exclusive of netedit)
const bool myAllowUndoRedo
allow undo/redo
bool buildEdgeRelationData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &fromEdgeID, const std::string &toEdgeID, const Parameterised::Map &parameters)
Builds edgeRelationData.
bool buildEdgeData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &edgeID, const Parameterised::Map &parameters)
Builds edgeData.
const bool myOverwrite
check if overwrite
bool checkDuplicatedDataSet(const std::string &id)
check if given ID correspond to a duplicated dataSet
bool postParserTasks()
run post parser tasks
GNENet * myNet
pointer to GNENet
GNEDataHandler & operator=(const GNEDataHandler &s)=delete
invalidate assignment operator
GNEDataHandler(const GNEDataHandler &s)=delete
invalidate copy constructor
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
std::map< std::string, std::string > Map
parameters map