Eclipse SUMO - Simulation of Urban MObility
GNEGeneralHandler.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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// General element handler for NETEDIT
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23
24// ===========================================================================
25// included modules
26// ===========================================================================
27
31
32// ===========================================================================
33// class declarations
34// ===========================================================================
35class GNENet;
36
37// ===========================================================================
38// class definitions
39// ===========================================================================
40
42
43public:
50 GNEGeneralHandler(GNENet* net, const std::string& file, const bool allowUndoRedo, const bool overwrite);
51
54
56 bool isErrorCreatingElement() const;
57
58private:
60 struct TagType {
62 TagType(SumoXMLTag tag, const bool network, const bool additional, const bool demand);
63
66
68 const bool network;
69
71 const bool additional;
72
74 const bool demand;
75 };
76
78 std::list<TagType> myQueue;
79
82
85
87 void beginTag(SumoXMLTag tag, const SUMOSAXAttributes& attrs);
88
90 void endTag();
91
94
97};
98
99/****************************************************************************/
100
SumoXMLTag
Numbers representing SUMO-XML - element names.
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
void endTag()
end element
void beginTag(SumoXMLTag tag, const SUMOSAXAttributes &attrs)
start element
~GNEGeneralHandler()
Destructor.
std::list< TagType > myQueue
queue with the inserted tags
GNEGeneralHandler(const GNEGeneralHandler &s)=delete
invalidate copy constructor
GNEGeneralHandler(GNENet *net, const std::string &file, const bool allowUndoRedo, const bool overwrite)
Constructor.
GNEAdditionalHandler myAdditionalHandler
additional handler
bool isErrorCreatingElement() const
get flag for check if a element wasn't created
GNEGeneralHandler & operator=(const GNEGeneralHandler &s)=delete
invalidate assignment operator
GNERouteHandler myDemandHandler
demand handler
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
Encapsulated SAX-Attributes.
const SumoXMLTag tag
tag related with this TagType
const bool demand
tagType is demand
TagType(SumoXMLTag tag, const bool network, const bool additional, const bool demand)
constructor
const bool additional
tagType is additional
const bool network
tagType is network