SUMO - Simulation of Urban MObility
GNEChange_Lane.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 // A network change in which a single lane is created or deleted
18 /****************************************************************************/
19 #ifndef GNEChange_Lane_h
20 #define GNEChange_Lane_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 <fx.h>
34 #include <netbuild/NBEdge.h>
35 #include "GNEChange.h"
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class GNEEdge;
41 class GNELane;
42 class GNEAdditional;
43 class GNEShape;
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
52 class GNEChange_Lane : public GNEChange {
53  FXDECLARE_ABSTRACT(GNEChange_Lane)
54 
55 public:
62  GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward);
63 
66 
70  FXString undoName() const;
71 
73  FXString redoName() const;
74 
76  void undo();
77 
79  void redo();
81 
82 
83 private:
86 
89 
92 
94  std::vector<GNEAdditional*> myAdditionalChilds;
95 
97  std::vector<GNEShape*> myShapeChilds;
98 
100  std::vector<GNEAdditional*> myAdditionalParents;
101 };
102 
103 #endif
104 /****************************************************************************/
const NBEdge::Lane myLaneAttrs
we need to preserve the attributes explicitly because they are not contained withing GNELane itself ...
~GNEChange_Lane()
Destructor.
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
FXString redoName() const
get Redo name
FXString undoName() const
return undoName
void undo()
undo action
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:53
std::vector< GNEAdditional * > myAdditionalParents
we need to preserve the list of additional sets in which this lane is a child
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:121
std::vector< GNEShape * > myShapeChilds
we need to preserve the list of shapes vinculated with this lane
void redo()
redo action
std::vector< GNEAdditional * > myAdditionalChilds
we need to preserve the list of additionals vinculated with this lane
GNEChange_Lane(GNEEdge *edge, GNELane *lane, const NBEdge::Lane &laneAttrs, bool forward)
Constructor for creating/deleting an edge.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:56
GNEEdge * myEdge
we need the edge because it is the target of our change commands
GNELane * myLane
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands ...
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:59