Eclipse SUMO - Simulation of Urban MObility
GNEChange_Additional.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 additional element is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Additional_h
18 #define GNEChange_Additional_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include "GNEChange.h"
26 
27 // ===========================================================================
28 // class declarations
29 // ===========================================================================
30 
31 class GNEViewNet;
32 class GNEEdge;
33 class GNELane;
34 class GNEShape;
35 class GNEAdditional;
36 class GNEDemandElement;
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
46  FXDECLARE_ABSTRACT(GNEChange_Additional)
47 
48 public:
53  GNEChange_Additional(GNEAdditional* additional, bool forward);
54 
57 
61  FXString undoName() const;
62 
64  FXString redoName() const;
65 
67  void undo();
68 
70  void redo();
72 
73 private:
78 
80  const std::vector<GNEEdge*>& myEdgeParents;
81 
83  const std::vector<GNELane*>& myLaneParents;
84 
86  const std::vector<GNEShape*>& myShapeParents;
87 
89  const std::vector<GNEAdditional*>& myAdditionalParents;
90 
92  const std::vector<GNEDemandElement*>& myDemandElementParents;
93 
95  const std::vector<GNEEdge*>& myEdgeChildren;
96 
98  const std::vector<GNELane*>& myLaneChildren;
99 
101  const std::vector<GNEShape*>& myShapeChildren;
102 
104  const std::vector<GNEAdditional*>& myAdditionalChildren;
105 
107  const std::vector<GNEDemandElement*>& myDemandElementChildren;
108 };
109 
110 #endif
111 /****************************************************************************/
const std::vector< GNEShape * > & myShapeParents
reference to vector of shape parents
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
const std::vector< GNEDemandElement * > & myDemandElementChildren
reference to vector of demand element children
const std::vector< GNEEdge * > & myEdgeChildren
reference to vector of edge children
const std::vector< GNELane * > & myLaneParents
reference to vector of lane parents
FXString redoName() const
get Redo name
const std::vector< GNELane * > & myLaneChildren
reference to vector of lane children
const std::vector< GNEAdditional * > & myAdditionalChildren
reference to vector of additional children
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
~GNEChange_Additional()
Destructor.
const std::vector< GNEShape * > & myShapeChildren
reference to vector of shape children
FXString undoName() const
return undoName
GNEAdditional * myAdditional
full information regarding the additional element that is to be created/deleted
const std::vector< GNEEdge * > & myEdgeParents
reference to vector of edge parents
GNEChange_Additional(GNEAdditional *additional, bool forward)
Constructor for creating/deleting an additional element.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
const std::vector< GNEDemandElement * > & myDemandElementParents
reference to vector of demand element parents
const std::vector< GNEAdditional * > & myAdditionalParents
reference to vector of additional parents
An Element which don&#39;t belongs to GNENet but has influency in the simulation.