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-2015 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 // 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 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
50 class GNEChange_Lane : public GNEChange {
51  FXDECLARE_ABSTRACT(GNEChange_Lane)
52 
53 public:
60  GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward);
61 
64 
65  FXString undoName() const;
66  FXString redoName() const;
67  void undo();
68  void redo();
69 
70 
71 private:
76  // we need the edge because it is the target of our change commands
78 
79  // we need to preserve the lane because it maybe the target of
80  // GNEChange_Attribute commands
82 
83  // we need to preserve the attributes explicitly because they are not
84  // contained withing GNELane itself
86 };
87 
88 #endif
89 /****************************************************************************/
const NBEdge::Lane myLaneAttrs
~GNEChange_Lane()
Destructor.
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:56
FXString redoName() const
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:122
FXString undoName() const
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:61
GNEEdge * myEdge
full information regarding the lane that is to be created/deleted we assume shared responsibility for...
GNELane * myLane