Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // A network change in which a single lane is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_Lane_h
17 #define GNEChange_Lane_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <fx.h>
27 #include <netbuild/NBEdge.h>
28 
29 #include "GNEChange.h"
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class GNEEdge;
35 class GNELane;
36 class GNEAdditional;
37 class GNEShape;
38 
39 // ===========================================================================
40 // class definitions
41 // ===========================================================================
46 class GNEChange_Lane : public GNEChange {
47  FXDECLARE_ABSTRACT(GNEChange_Lane)
48 
49 public:
57  GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward, bool recomputeConnections = true);
58 
61 
65  FXString undoName() const;
66 
68  FXString redoName() const;
69 
71  void undo();
72 
74  void redo();
76 
77 
78 private:
81 
84 
87 
90 
92  std::vector<GNEShape*> myParentShapes;
93 
95  std::vector<GNEAdditional*> myParentAdditionals;
96 
98  std::vector<GNEDemandElement*> myParentDemandElements;
99 
101  std::vector<GNEShape*> myChildShapes;
102 
104  std::vector<GNEAdditional*> myChildAdditionals;
105 
107  std::vector<GNEDemandElement*> myChildDemandElements;
108 };
109 
110 #endif
111 /****************************************************************************/
fxexdefs.h
GNEChange_Lane::myChildAdditionals
std::vector< GNEAdditional * > myChildAdditionals
vector of child additional
Definition: GNEChange_Lane.h:104
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEChange_Lane::~GNEChange_Lane
~GNEChange_Lane()
Destructor.
Definition: GNEChange_Lane.cpp:67
GNEChange_Lane::myChildShapes
std::vector< GNEShape * > myChildShapes
vector of child shapes
Definition: GNEChange_Lane.h:101
GNEChange.h
GNEChange_Lane::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Lane.cpp:230
GNEChange_Lane::myLaneAttrs
const NBEdge::Lane myLaneAttrs
we need to preserve the attributes explicitly because they are not contained withing GNELane itself
Definition: GNEChange_Lane.h:86
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEChange_Lane::undo
void undo()
undo action
Definition: GNEChange_Lane.cpp:87
GNEShape
Definition: GNEShape.h:34
GNEChange_Lane
Definition: GNEChange_Lane.h:46
GNEChange_Lane::myLane
GNELane * myLane
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands
Definition: GNEChange_Lane.h:83
NBEdge::Lane
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:142
GNEChange_Lane::myChildDemandElements
std::vector< GNEDemandElement * > myChildDemandElements
vector of child demand elements
Definition: GNEChange_Lane.h:107
config.h
GNEChange_Lane::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Lane.cpp:220
GNEChange_Lane::myEdge
GNEEdge * myEdge
we need the edge because it is the target of our change commands
Definition: GNEChange_Lane.h:80
GNEChange_Lane::myParentShapes
std::vector< GNEShape * > myParentShapes
vector of parent shapes
Definition: GNEChange_Lane.h:92
GNEChange_Lane::myRecomputeConnections
bool myRecomputeConnections
@bried whether to recompute connection when adding a new lane
Definition: GNEChange_Lane.h:89
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
GNEChange_Lane::myParentAdditionals
std::vector< GNEAdditional * > myParentAdditionals
vector of parent additionals
Definition: GNEChange_Lane.h:95
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEChange_Lane::GNEChange_Lane
GNEChange_Lane(GNEEdge *edge, GNELane *lane, const NBEdge::Lane &laneAttrs, bool forward, bool recomputeConnections=true)
Constructor for creating/deleting an edge.
Definition: GNEChange_Lane.cpp:43
GNEChange_Lane::redo
void redo()
redo action
Definition: GNEChange_Lane.cpp:154
NBEdge.h
GNEChange_Lane::myParentDemandElements
std::vector< GNEDemandElement * > myParentDemandElements
vector of parent demand elements
Definition: GNEChange_Lane.h:98