SUMO - Simulation of Urban MObility
GNEChange_Edge.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which a single edge is created or deleted
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 #ifndef GNEChange_Edge_h
21 #define GNEChange_Edge_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <fx.h>
35 #include <vector>
36 #include <map>
37 #include "GNEChange.h"
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class GNENet;
43 class GNEEdge;
44 class GNELane;
45 class GNEAdditional;
46 class GNERerouter;
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
55 class GNEChange_Edge : public GNEChange {
56  // @brief FOX Declaration
57  FXDECLARE_ABSTRACT(GNEChange_Edge)
58 
59 public:
64  GNEChange_Edge(GNEEdge* edge, bool forward);
65 
68 
72  FXString undoName() const;
73 
75  FXString redoName() const;
76 
78  void undo();
79 
81  void redo();
83 
84 
85 private:
90 
92  std::vector<GNEAdditional*> myAdditionalChilds;
93 
95  std::vector<GNERerouter*> myGNERerouters;
96 
98  std::map<GNELane*, std::vector<GNEAdditional*> > myAdditionalLanes;
99 
101  std::map<GNELane*, std::vector<GNEAdditional*> > myAdditionalsLanes;
102 };
103 
104 #endif
105 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
void undo()
undo action
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
std::vector< GNEAdditional * > myAdditionalChilds
we need to preserve the list of additionals vinculated with this edge
FXString undoName() const
return undoName
std::map< GNELane *, std::vector< GNEAdditional * > > myAdditionalsLanes
we need to preserve the additional sets in which the edge of lanes are childs
GNEChange_Edge(GNEEdge *edge, bool forward)
Constructor for creating/deleting an edge.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:57
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:62
std::map< GNELane *, std::vector< GNEAdditional * > > myAdditionalLanes
we need to preserve additional vinculated with the lanes of edge
GNEEdge * myEdge
full information regarding the edge that is to be created/deleted
std::vector< GNERerouter * > myGNERerouters
we need to preserve the list of rerouters in which this edge is a child
~GNEChange_Edge()
Destructor.