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 /****************************************************************************/
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEChange_Additional::myShapeParents
const std::vector< GNEShape * > & myShapeParents
reference to vector of shape parents
Definition: GNEChange_Additional.h:86
GNEChange_Additional::myAdditionalChildren
const std::vector< GNEAdditional * > & myAdditionalChildren
reference to vector of additional children
Definition: GNEChange_Additional.h:104
GNEChange_Additional::redo
void redo()
redo action
Definition: GNEChange_Additional.cpp:189
GNEChange_Additional
Definition: GNEChange_Additional.h:45
GNEChange.h
GNEChange_Additional::myDemandElementParents
const std::vector< GNEDemandElement * > & myDemandElementParents
reference to vector of demand element parents
Definition: GNEChange_Additional.h:92
GNEViewNet
Definition: GNEViewNet.h:43
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEChange_Additional::myShapeChildren
const std::vector< GNEShape * > & myShapeChildren
reference to vector of shape children
Definition: GNEChange_Additional.h:101
GNEShape
Definition: GNEShape.h:35
GNEChange_Additional::myEdgeParents
const std::vector< GNEEdge * > & myEdgeParents
reference to vector of edge parents
Definition: GNEChange_Additional.h:80
GNEChange_Additional::myEdgeChildren
const std::vector< GNEEdge * > & myEdgeChildren
reference to vector of edge children
Definition: GNEChange_Additional.h:95
GNEChange_Additional::~GNEChange_Additional
~GNEChange_Additional()
Destructor.
Definition: GNEChange_Additional.cpp:59
GNEChange_Additional::myLaneChildren
const std::vector< GNELane * > & myLaneChildren
reference to vector of lane children
Definition: GNEChange_Additional.h:98
GNEChange_Additional::myDemandElementChildren
const std::vector< GNEDemandElement * > & myDemandElementChildren
reference to vector of demand element children
Definition: GNEChange_Additional.h:107
GNEChange_Additional::myLaneParents
const std::vector< GNELane * > & myLaneParents
reference to vector of lane parents
Definition: GNEChange_Additional.h:83
GNEChange_Additional::myAdditional
GNEAdditional * myAdditional
full information regarding the additional element that is to be created/deleted
Definition: GNEChange_Additional.h:77
config.h
GNEChange_Additional::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Additional.cpp:271
GNEChange_Additional::myAdditionalParents
const std::vector< GNEAdditional * > & myAdditionalParents
reference to vector of additional parents
Definition: GNEChange_Additional.h:89
GNEChange_Additional::undo
void undo()
undo action
Definition: GNEChange_Additional.cpp:107
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_Additional::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Additional.cpp:281
GNEChange_Additional::GNEChange_Additional
GNEChange_Additional(GNEAdditional *additional, bool forward)
Constructor for creating/deleting an additional element.
Definition: GNEChange_Additional.cpp:42