SUMO - Simulation of Urban MObility
GNEClosingLaneReroute.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 GNEClosingLaneReroute_h
20 #define GNEClosingLaneReroute_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 GNELane;
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
55 
56 public:
58  GNEClosingLaneReroute(GNERerouterIntervalDialog* rerouterIntervalDialog);
59 
61  GNEClosingLaneReroute(GNERerouterInterval* rerouterIntervalParent, GNELane* closedLane,
62  SVCPermissions allowedVehicles = SVC_IGNORING, SVCPermissions disallowedVehicles = SVC_IGNORING);
63 
66 
67  // @brief write closing lane reroute
68  void writeClosingLaneReroute(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 
115 
118 };
119 
120 #endif
121 
122 /****************************************************************************/
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
SVCPermissions myDisallowedVehicles
codified disallowed vehicles
Dialog for edit rerouter intervals.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:53
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEClosingLaneReroute & operator=(const GNEClosingLaneReroute &)=delete
Invalidated assignment operator.
SVCPermissions myAllowedVehicles
codified allowed vehicles
GNELane * myClosedLane
closed lane
bool isValid(SumoXMLAttr key, const std::string &value)
void writeClosingLaneReroute(OutputDevice &device) const
GNERerouterInterval * getRerouterIntervalParent() const
get rerouter interval parent
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
GNERerouterInterval * myRerouterIntervalParent
reference to rerouter interval parent
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNEClosingLaneReroute(GNERerouterIntervalDialog *rerouterIntervalDialog)
constructor (Used in GNERerouterIntervalDialog)
vehicles ignoring classes