SUMO - Simulation of Urban MObility
GNEClosingReroute.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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 //
18 /****************************************************************************/
19 #ifndef GNEClosingReroute_h
20 #define GNEClosingReroute_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <vector>
36 
37 #include "GNEAttributeCarrier.h"
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 
43 class GNEEdge;
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
55 
56 public:
58  GNEClosingReroute(GNERerouterIntervalDialog* rerouterIntervalDialog);
59 
61  GNEClosingReroute(GNERerouterInterval* rerouterIntervalParent, GNEEdge* closedEdge,
62  SVCPermissions allowedVehicles = SVC_IGNORING, SVCPermissions disallowedVehicles = SVC_IGNORING);
63 
66 
68  void writeClosingReroute(OutputDevice& device) const;
69 
72 
75  /* @brief method for getting the Attribute of an XML key
76  * @param[in] key The attribute key
77  * @return string with the value associated to key
78  */
79  std::string getAttribute(SumoXMLAttr key) const;
80 
81  /* @brief method for setting the attribute and letting the object perform additional changes
82  * @param[in] key The attribute key
83  * @param[in] value The new value
84  * @param[in] undoList The undoList on which to register changes
85  */
86  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
87 
88  /* @brief method for checking if the key and their correspond attribute are valids
89  * @param[in] key The attribute key
90  * @param[in] value The value asociated to key key
91  * @return true if the value is valid, false in other case
92  */
93  bool isValid(SumoXMLAttr key, const std::string& value);
95 
96 protected:
99 
102 
105 
108 
109 private:
111  void setAttribute(SumoXMLAttr key, const std::string& value);
112 
114  GNEClosingReroute(const GNEClosingReroute&) = delete;
115 
118 };
119 
120 #endif
121 
122 /****************************************************************************/
GNEClosingReroute & operator=(const GNEClosingReroute &)=delete
Invalidated assignment operator.
Dialog for edit rerouter intervals.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SVCPermissions myAllowedVehicles
codified allowed vehicles
SVCPermissions myDisallowedVehicles
codified disallowed vehicles
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNERerouterInterval * myRerouterIntervalParent
reference to rerouter interval parent
GNEClosingReroute(GNERerouterIntervalDialog *rerouterIntervalDialog)
constructor (Used in GNERerouterIntervalDialog)
bool isValid(SumoXMLAttr key, const std::string &value)
void writeClosingReroute(OutputDevice &device) const
write ClosingReroute
~GNEClosingReroute()
destructor
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
GNEEdge * myClosedEdge
closed edge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:56
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
vehicles ignoring classes
GNERerouterInterval * getRerouterIntervalParent() const
get rerouter interval parent