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 /****************************************************************************/
15 // A network change in which a single lane is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Lane_h
18 #define GNEChange_Lane_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
28 #include <netbuild/NBEdge.h>
29 
30 #include "GNEChange.h"
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class GNEEdge;
36 class GNELane;
37 class GNEAdditional;
38 class GNEShape;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 class GNEChange_Lane : public GNEChange {
48  FXDECLARE_ABSTRACT(GNEChange_Lane)
49 
50 public:
58  GNEChange_Lane(GNEEdge* edge, GNELane* lane, const NBEdge::Lane& laneAttrs, bool forward, bool recomputeConnections = true);
59 
62 
66  FXString undoName() const;
67 
69  FXString redoName() const;
70 
72  void undo();
73 
75  void redo();
77 
78 
79 private:
82 
85 
88 
91 
93  std::vector<GNEShape*> myShapeParents;
94 
96  std::vector<GNEAdditional*> myAdditionalParents;
97 
99  std::vector<GNEDemandElement*> myDemandElementParents;
100 
102  std::vector<GNEShape*> myShapeChildren;
103 
105  std::vector<GNEAdditional*> myAdditionalChildren;
106 
108  std::vector<GNEDemandElement*> myDemandElementChildren;
109 };
110 
111 #endif
112 /****************************************************************************/
fxexdefs.h
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEChange_Lane::myAdditionalChildren
std::vector< GNEAdditional * > myAdditionalChildren
vector of additional children
Definition: GNEChange_Lane.h:105
GNEChange_Lane::myDemandElementParents
std::vector< GNEDemandElement * > myDemandElementParents
vector of demand element parents
Definition: GNEChange_Lane.h:99
GNEChange_Lane::~GNEChange_Lane
~GNEChange_Lane()
Destructor.
Definition: GNEChange_Lane.cpp:68
GNEChange.h
GNEChange_Lane::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Lane.cpp:231
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:87
GNEChange_Lane::myShapeParents
std::vector< GNEShape * > myShapeParents
vector of shape parents
Definition: GNEChange_Lane.h:93
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEChange_Lane::undo
void undo()
undo action
Definition: GNEChange_Lane.cpp:88
GNEShape
Definition: GNEShape.h:35
GNEChange_Lane
Definition: GNEChange_Lane.h:47
GNEChange_Lane::myDemandElementChildren
std::vector< GNEDemandElement * > myDemandElementChildren
vector of demand element children
Definition: GNEChange_Lane.h:108
GNEChange_Lane::myLane
GNELane * myLane
we need to preserve the lane because it maybe the target of GNEChange_Attribute commands
Definition: GNEChange_Lane.h:84
GNEChange_Lane::myShapeChildren
std::vector< GNEShape * > myShapeChildren
vector of shape children
Definition: GNEChange_Lane.h:102
NBEdge::Lane
An (internal) definition of a single lane of an edge.
Definition: NBEdge.h:137
config.h
GNEChange_Lane::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Lane.cpp:221
GNEChange_Lane::myEdge
GNEEdge * myEdge
we need the edge because it is the target of our change commands
Definition: GNEChange_Lane.h:81
GNEChange_Lane::myRecomputeConnections
bool myRecomputeConnections
@bried whether to recompute connection when adding a new lane
Definition: GNEChange_Lane.h:90
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
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:44
GNEChange_Lane::redo
void redo()
redo action
Definition: GNEChange_Lane.cpp:155
NBEdge.h
GNEChange_Lane::myAdditionalParents
std::vector< GNEAdditional * > myAdditionalParents
vector of additional parents
Definition: GNEChange_Lane.h:96