SUMO - Simulation of Urban MObility
GNEChange_Lane.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which a single lane 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_Lane_h
21 #define GNEChange_Lane_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 <netbuild/NBEdge.h>
36 #include "GNEChange.h"
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class GNEEdge;
42 class GNELane;
43 class GNEAdditional;
44 class GNEAdditionalSet;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
53 class GNEChange_Lane : public GNEChange {
54  FXDECLARE_ABSTRACT(GNEChange_Lane)
55 
56 public:
63  GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward);
64 
67 
71  FXString undoName() const;
72 
74  FXString redoName() const;
75 
77  void undo();
78 
80  void redo();
82 
83 
84 private:
87 
90 
93 
95  std::vector<GNEAdditional*> myAdditionalChilds;
96 
98  std::vector<GNEAdditionalSet*> myAdditionalSetParents;
99 };
100 
101 #endif
102 /****************************************************************************/
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:49
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:55
An Element wich group additionalSet elements.
std::vector< GNEAdditionalSet * > myAdditionalSetParents
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:124
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:55
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:63