Eclipse SUMO - Simulation of Urban MObility
GNEChange_Shape.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 Shape is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_Shape_h
17 #define GNEChange_Shape_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <fx.h>
27 #include "GNEChange.h"
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
32 class GNENet;
33 class GNEShape;
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 class GNEChange_Shape : public GNEChange {
43  FXDECLARE_ABSTRACT(GNEChange_Shape)
44 
45 public:
50  GNEChange_Shape(GNEShape* shape, bool forward);
51 
54 
58  FXString undoName() const;
59 
61  FXString redoName() const;
62 
64  void undo();
65 
67  void redo();
69 
70 private:
73 
75  const std::vector<GNEEdge*>& myParentEdges;
76 
78  const std::vector<GNELane*>& myParentLanes;
79 
81  const std::vector<GNEShape*>& myParentShapes;
82 
84  const std::vector<GNEAdditional*>& myParentAdditionals;
85 
87  const std::vector<GNEDemandElement*>& myParentDemandElements;
88 
90  const std::vector<GNEEdge*>& myChildEdges;
91 
93  const std::vector<GNELane*>& myChildLanes;
94 
96  const std::vector<GNEShape*>& myChildShapes;
97 
99  const std::vector<GNEAdditional*>& myChildAdditionals;
100 
102  const std::vector<GNEDemandElement*>& myChildDemandElements;
103 };
104 
105 #endif
106 /****************************************************************************/
GNEChange_Shape::myChildAdditionals
const std::vector< GNEAdditional * > & myChildAdditionals
reference to vector of child additional
Definition: GNEChange_Shape.h:99
fxexdefs.h
GNEChange_Shape::myChildLanes
const std::vector< GNELane * > & myChildLanes
reference to vector of child lanes
Definition: GNEChange_Shape.h:93
GNEChange_Shape::undo
void undo()
undo action
Definition: GNEChange_Shape.cpp:151
GNEChange_Shape::myParentShapes
const std::vector< GNEShape * > & myParentShapes
reference to vector of parent shapes
Definition: GNEChange_Shape.h:81
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
GNEChange.h
GNEChange_Shape::myChildDemandElements
const std::vector< GNEDemandElement * > & myChildDemandElements
reference to vector of child demand elements
Definition: GNEChange_Shape.h:102
GNEChange_Shape::myParentAdditionals
const std::vector< GNEAdditional * > & myParentAdditionals
reference to vector of parent additionals
Definition: GNEChange_Shape.h:84
GNEChange_Shape::myParentEdges
const std::vector< GNEEdge * > & myParentEdges
reference to vector of parent edges
Definition: GNEChange_Shape.h:75
GNEChange_Shape::redo
void redo()
redo action
Definition: GNEChange_Shape.cpp:231
GNEChange_Shape::myChildShapes
const std::vector< GNEShape * > & myChildShapes
reference to vector of child shapes
Definition: GNEChange_Shape.h:96
GNEShape
Definition: GNEShape.h:34
GNEChange_Shape::~GNEChange_Shape
~GNEChange_Shape()
Destructor.
Definition: GNEChange_Shape.cpp:57
GNEChange_Shape::myChildEdges
const std::vector< GNEEdge * > & myChildEdges
reference to vector of child edges
Definition: GNEChange_Shape.h:90
GNEChange_Shape::myParentDemandElements
const std::vector< GNEDemandElement * > & myParentDemandElements
reference to vector of parent demand elements
Definition: GNEChange_Shape.h:87
GNEChange_Shape::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Shape.cpp:321
config.h
GNEChange_Shape::GNEChange_Shape
GNEChange_Shape(GNEShape *shape, bool forward)
Constructor.
Definition: GNEChange_Shape.cpp:40
GNEChange_Shape::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Shape.cpp:311
GNEChange_Shape::myShape
GNEShape * myShape
pointer to shape
Definition: GNEChange_Shape.h:72
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
GNEChange_Shape
Definition: GNEChange_Shape.h:42
GNEChange_Shape::myParentLanes
const std::vector< GNELane * > & myParentLanes
reference to vector of parent lanes
Definition: GNEChange_Shape.h:78