Eclipse SUMO - Simulation of Urban MObility
GNEChange_Edge.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // A network change in which a single edge is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Edge_h
18 #define GNEChange_Edge_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
28 #include <vector>
29 #include <map>
30 #include "GNEChange.h"
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class GNENet;
36 class GNEEdge;
37 class GNELane;
38 class GNEAdditional;
39 class GNERerouter;
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
48 class GNEChange_Edge : public GNEChange {
49  // @brief FOX Declaration
50  FXDECLARE_ABSTRACT(GNEChange_Edge)
51 
52 public:
57  GNEChange_Edge(GNEEdge* edge, bool forward);
58 
61 
65  FXString undoName() const;
66 
68  FXString redoName() const;
69 
71  void undo();
72 
74  void redo();
76 
77 
78 private:
83 
85  const std::vector<GNEShape*>& myEdgeShapeParents;
86 
88  const std::vector<GNEAdditional*>& myEdgeAdditionalParents;
89 
91  const std::vector<GNEDemandElement*>& myEdgeDemandElementParents;
92 
94  const std::vector<GNEShape*>& myEdgeShapeChildren;
95 
97  const std::vector<GNEAdditional*>& myEdgeAdditionalChildren;
98 
100  const std::vector<GNEDemandElement*>& myEdgeDemandElementChildren;
101 
103  std::vector<std::vector<GNEShape*> > myLaneShapeParents;
104 
106  std::vector<std::vector<GNEAdditional*> > myLaneAdditionalParents;
107 
109  std::vector<std::vector<GNEDemandElement*> > myLaneDemandElementParents;
110 
112  std::vector<std::vector<GNEShape*> > myLaneShapeChildren;
113 
115  std::vector<std::vector<GNEAdditional*> > myLaneAdditionalChildren;
116 
118  std::vector<std::vector<GNEDemandElement*> > myLaneDemandElementChildren;
119 };
120 
121 #endif
122 /****************************************************************************/
std::vector< std::vector< GNEAdditional * > > myLaneAdditionalChildren
vector of references to vector of additional children (used by lanes)
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
std::vector< std::vector< GNEDemandElement * > > myLaneDemandElementParents
vector of references to vector of demand element parents (used by lanes)
void undo()
undo action
std::vector< std::vector< GNEShape * > > myLaneShapeParents
vector of references to vector of shape parents (used by lanes)
const std::vector< GNEAdditional * > & myEdgeAdditionalChildren
reference to vector of additional children
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
const std::vector< GNEShape * > & myEdgeShapeParents
reference to vector of shape parents
FXString undoName() const
return undoName
const std::vector< GNEDemandElement * > & myEdgeDemandElementParents
reference to vector of demand element parents
const std::vector< GNEAdditional * > & myEdgeAdditionalParents
reference to vector of additional parents
std::vector< std::vector< GNEDemandElement * > > myLaneDemandElementChildren
vector of references to vector of demand element children (used by lanes)
GNEChange_Edge(GNEEdge *edge, bool forward)
Constructor for creating/deleting an edge.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
FXString redoName() const
get Redo name
void redo()
redo action
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEEdge * myEdge
full information regarding the edge that is to be created/deleted
std::vector< std::vector< GNEShape * > > myLaneShapeChildren
vector of references to vector of shape children (used by lanes)
const std::vector< GNEDemandElement * > & myEdgeDemandElementChildren
vector of references to vector of demand element children (used by lanes)
~GNEChange_Edge()
Destructor.
std::vector< std::vector< GNEAdditional * > > myLaneAdditionalParents
vector of references to vector of additional parents (used by lanes)
const std::vector< GNEShape * > & myEdgeShapeChildren
reference to vector of shape children