SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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-2016 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 GNEAdditionalSet;
47 
48 // ===========================================================================
49 // class definitions
50 // ===========================================================================
55 class GNEChange_Edge : public GNEChange {
56  // @brief FOX Declaration
57  FXDECLARE_ABSTRACT(GNEChange_Edge)
58 
59 public:
65  GNEChange_Edge(GNENet* net, GNEEdge* edge, bool forward);
66 
69 
73  FXString undoName() const;
74 
76  FXString redoName() const;
77 
79  void undo();
80 
82  void redo();
84 
85 
86 private:
91 
93  std::vector<GNEAdditional*> myAdditionalChilds;
94 
96  std::vector<GNEAdditionalSet*> myAdditionalSetParents;
97 
99  std::map<GNELane*, std::vector<GNEAdditional*> > myAdditionalLanes;
100 
102  std::map<GNELane*, std::vector<GNEAdditionalSet*> > myAdditionalSetsLanes;
103 };
104 
105 #endif
106 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
void undo()
undo action
std::map< GNELane *, std::vector< GNEAdditionalSet * > > myAdditionalSetsLanes
we need to preserve the additional sets in which the edge of lanes are childs
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:87
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:55
std::vector< GNEAdditional * > myAdditionalChilds
we need to preserve the list of additionals vinculated with this edge
An Element wich group additionalSet elements.
FXString redoName() const
get Redo name
GNEChange_Edge(GNENet *net, GNEEdge *edge, bool forward)
Constructor for creating/deleting an edge.
FXString undoName() const
return undoName
std::vector< GNEAdditionalSet * > myAdditionalSetParents
we need to preserve the list of additional sets in which this edge is a child
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:55
void redo()
redo action
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:63
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
~GNEChange_Edge()
Destructor.