SUMO - Simulation of Urban MObility
GNEClosingReroute.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #include <utils/common/ToString.h>
31 
32 #include "GNEClosingReroute.h"
33 #include "GNEEdge.h"
34 
35 
36 // ===========================================================================
37 // member method definitions
38 // ===========================================================================
39 
40 GNEClosingReroute::GNEClosingReroute(GNERerouterInterval& rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions allowedVehicles, SVCPermissions disallowedVehicles) :
41  myRerouterIntervalParent(&rerouterIntervalParent),
42  myClosedEdge(closedEdge),
43  myAllowedVehicles(allowedVehicles),
44  myDisallowedVehicles(disallowedVehicles),
46 }
47 
48 
50 }
51 
52 
55  return myAllowedVehicles;
56 }
57 
58 
61  return myDisallowedVehicles;
62 }
63 
64 
65 void
67  myAllowedVehicles = allowed;
68 }
69 
70 
71 void
73  myDisallowedVehicles = disallowed;
74 }
75 
76 
77 GNEEdge*
79  return myClosedEdge;
80 }
81 
82 
83 void
85  myClosedEdge = edge;
86 }
87 
88 
91  return myTag;
92 }
93 
94 
98 }
99 
100 
101 bool
102 GNEClosingReroute::operator==(const GNEClosingReroute& closingReroute) const {
103  if ((myRerouterIntervalParent == closingReroute.myRerouterIntervalParent) &&
104  (myClosedEdge == closingReroute.myClosedEdge) &&
105  (myAllowedVehicles == closingReroute.myAllowedVehicles) &&
106  (myDisallowedVehicles == closingReroute.myDisallowedVehicles)) {
107  return true;
108  } else {
109  return false;
110  }
111 }
112 
113 /****************************************************************************/
SumoXMLTag
Numbers representing SUMO-XML - element names.
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
GNERerouterInterval * myRerouterIntervalParent
reference to rerouter interval parent
GNEEdge * getClosedEdge() const
get closed edge
SumoXMLTag myTag
XML Tag of closing reroute.
void setClosedEdge(GNEEdge *edge)
set closed edge
~GNEClosingReroute()
destructor
GNEClosingReroute(GNERerouterInterval &rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions allowedVehicles=SVC_IGNORING, SVCPermissions disallowedVehicles=SVC_IGNORING)
constructor
SumoXMLTag getTag() const
get tag
GNEEdge * myClosedEdge
closed edge
bool operator==(const GNEClosingReroute &closingReroute) const
overload operator ==
SVCPermissions getDisallowedVehicles() const
get disallowed vehicles
reroute of type closing
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:57
const GNERerouterInterval & getRerouterIntervalParent() const
get rerouter interval parent
SVCPermissions getAllowedVehicles() const
get allowed vehicles
void setDisallowedVehicles(SVCPermissions disallowed)
set disallowed vehicles
void setAllowedVehicles(SVCPermissions allowed)
set allowed vehicles