SUMO - Simulation of Urban MObility
NIXMLNodesHandler.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Importer for network nodes stored in XML
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NIXMLNodesHandler_h
23 #define NIXMLNodesHandler_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
36 #include <utils/geom/Position.h>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class OptionsCont;
43 class GeoConvHelper;
44 class NBNode;
45 class NBNodeCont;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
61 
62 public:
72  OptionsCont& options);
73 
74 
77 
78 
79 protected:
81 
82 
93  void myStartElement(int element,
94  const SUMOSAXAttributes& attrs);
96 
97 
98 private:
99  /*
100  * @brief Parses node information
101  * Tries to parse a node. If the node can be parsed, it is stored within
102  * "myNodeCont". Otherwise an error is generated. Then, if given
103  * the tls information is parsed and inserted into "myTLLogicCont".
104  */
105  void addNode(const SUMOSAXAttributes& attrs);
106 
107  /*
108  * @brief Parses node deletion information
109  */
110  void deleteNode(const SUMOSAXAttributes& attrs);
111 
112  /*
113  * @brief Parses a cluster of nodes to be joined
114  */
115  void addJoinCluster(const SUMOSAXAttributes& attrs);
116 
117  /*
118  * @brief Parses a list of nodes to be excluded from joining
119  */
120  void addJoinExclusion(const SUMOSAXAttributes& attrs);
121 
128  NBNode* currentNode);
129 
130 
131 private:
134 
136  std::string myID;
137 
140 
143 
146 
149 
150 
151 private:
154 
157 
158 };
159 
160 
161 #endif
162 
163 /****************************************************************************/
164 
GeoConvHelper * myLocation
The coordinate transformation which was used compute the node coordinates.
std::string myID
The id of the currently parsed node.
A container for traffic light definitions and built programs.
~NIXMLNodesHandler()
Destructor.
Position myPosition
The position of the currently parsed node.
NBTrafficLightLogicCont & myTLLogicCont
The traffic lights container to add built tls to.
SAX-handler base for SUMO-files.
NBNodeCont & myNodeCont
The node container to add built nodes to.
Importer for network nodes stored in XML.
static methods for processing the coordinates conversion for the current net
Definition: GeoConvHelper.h:60
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
void deleteNode(const SUMOSAXAttributes &attrs)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
OptionsCont & myOptions
A reference to the program's options.
void addJoinExclusion(const SUMOSAXAttributes &attrs)
void addJoinCluster(const SUMOSAXAttributes &attrs)
A storage for options typed value containers)
Definition: OptionsCont.h:108
Represents a single node (junction) during network building.
Definition: NBNode.h:75
void addNode(const SUMOSAXAttributes &attrs)
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:64
NIXMLNodesHandler & operator=(const NIXMLNodesHandler &s)
invalid assignment operator
void processTrafficLightDefinitions(const SUMOSAXAttributes &attrs, NBNode *currentNode)
Builds the defined traffic light or adds a node to it.
NIXMLNodesHandler(NBNodeCont &nc, NBTrafficLightLogicCont &tlc, OptionsCont &options)
Constructor.