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 // ===========================================================================
35 class GNENet;
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
40 
42 
43 public:
49  GNEGeneralHandler(GNENet* net, const std::string& file, const bool allowUndoRedo);
50 
53 
54 private:
56  struct TagType {
58  TagType(SumoXMLTag tag, const bool additional, const bool demand);
59 
61  const SumoXMLTag tag;
62 
64  const bool additional;
65 
67  const bool demand;
68  };
69 
71  std::list<TagType> myQueue;
72 
75 
78 
80  void beginTag(SumoXMLTag tag, const SUMOSAXAttributes& attrs);
81 
83  void endTag();
84 
87 
90 };
91 
92 /****************************************************************************/
93 
SumoXMLTag
Numbers representing SUMO-XML - element names.
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
GNEGeneralHandler(GNENet *net, const std::string &file, const bool allowUndoRedo)
Constructor.
void endTag()
end element
void beginTag(SumoXMLTag tag, const SUMOSAXAttributes &attrs)
start element
GNEGeneralHandler & operator=(const GNEGeneralHandler &s)=delete
invalidate assignment operator
~GNEGeneralHandler()
Destructor.
std::list< TagType > myQueue
queue with the inserted tags
GNEGeneralHandler(const GNEGeneralHandler &s)=delete
invalidate copy constructor
GNEAdditionalHandler myAdditionalHandler
additional handler
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 additional, const bool demand)
constructor
const bool additional
tagType is additional