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 /****************************************************************************/
15 // A network change in which a single Shape is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Shape_h
18 #define GNEChange_Shape_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
28 #include "GNEChange.h"
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
33 class GNENet;
34 class GNEShape;
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 class GNEChange_Shape : public GNEChange {
44  FXDECLARE_ABSTRACT(GNEChange_Shape)
45 
46 public:
51  GNEChange_Shape(GNEShape* shape, bool forward);
52 
55 
59  FXString undoName() const;
60 
62  FXString redoName() const;
63 
65  void undo();
66 
68  void redo();
70 
71 private:
74 
76  const std::vector<GNEEdge*>& myEdgeParents;
77 
79  const std::vector<GNELane*>& myLaneParents;
80 
82  const std::vector<GNEShape*>& myShapeParents;
83 
85  const std::vector<GNEAdditional*>& myAdditionalParents;
86 
88  const std::vector<GNEDemandElement*>& myDemandElementParents;
89 
91  const std::vector<GNEEdge*>& myEdgeChildren;
92 
94  const std::vector<GNELane*>& myLaneChildren;
95 
97  const std::vector<GNEShape*>& myShapeChildren;
98 
100  const std::vector<GNEAdditional*>& myAdditionalChildren;
101 
103  const std::vector<GNEDemandElement*>& myDemandElementChildren;
104 };
105 
106 #endif
107 /****************************************************************************/
const std::vector< GNEEdge * > & myEdgeChildren
reference to vector of edge children
const std::vector< GNEDemandElement * > & myDemandElementParents
reference to vector of demand element parents
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
const std::vector< GNELane * > & myLaneChildren
reference to vector of lane children
void redo()
redo action
GNEChange_Shape(GNEShape *shape, bool forward)
Constructor.
FXString redoName() const
get Redo name
GNEShape * myShape
pointer to shape
const std::vector< GNEDemandElement * > & myDemandElementChildren
reference to vector of demand element children
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
const std::vector< GNEAdditional * > & myAdditionalParents
reference to vector of additional parents
const std::vector< GNEEdge * > & myEdgeParents
reference to vector of edge parents
FXString undoName() const
return undoName
~GNEChange_Shape()
Destructor.
const std::vector< GNEShape * > & myShapeChildren
reference to vector of shape children
const std::vector< GNELane * > & myLaneParents
reference to vector of lane parents
const std::vector< GNEShape * > & myShapeParents
reference to vector of shape parents
void undo()
undo action
const std::vector< GNEAdditional * > & myAdditionalChildren
reference to vector of additional children