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 /****************************************************************************/
14 // A network change in which a additional element is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_Additional_h
17 #define GNEChange_Additional_h
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #include "GNEChange.h"
25 
26 // ===========================================================================
27 // class declarations
28 // ===========================================================================
29 
30 class GNEViewNet;
31 class GNEEdge;
32 class GNELane;
33 class GNEShape;
34 class GNEAdditional;
35 class GNEDemandElement;
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
45  FXDECLARE_ABSTRACT(GNEChange_Additional)
46 
47 public:
52  GNEChange_Additional(GNEAdditional* additional, bool forward);
53 
56 
60  FXString undoName() const;
61 
63  FXString redoName() const;
64 
66  void undo();
67 
69  void redo();
71 
72 private:
77 
79  const std::vector<GNEEdge*>& myParentEdges;
80 
82  const std::vector<GNELane*>& myParentLanes;
83 
85  const std::vector<GNEShape*>& myParentShapes;
86 
88  const std::vector<GNEAdditional*>& myParentAdditionals;
89 
91  const std::vector<GNEDemandElement*>& myParentDemandElements;
92 
94  const std::vector<GNEEdge*>& myChildEdges;
95 
97  const std::vector<GNELane*>& myChildLanes;
98 
100  const std::vector<GNEShape*>& myChildShapes;
101 
103  const std::vector<GNEAdditional*>& myChildAdditionals;
104 
106  const std::vector<GNEDemandElement*>& myChildDemandElements;
107 };
108 
109 #endif
110 /****************************************************************************/
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:55
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
GNEChange_Additional::redo
void redo()
redo action
Definition: GNEChange_Additional.cpp:188
GNEChange_Additional
Definition: GNEChange_Additional.h:44
GNEChange.h
GNEChange_Additional::myChildLanes
const std::vector< GNELane * > & myChildLanes
reference to vector of child lanes
Definition: GNEChange_Additional.h:97
GNEViewNet
Definition: GNEViewNet.h:42
GNEChange_Additional::myParentAdditionals
const std::vector< GNEAdditional * > & myParentAdditionals
reference to vector of parent additionals
Definition: GNEChange_Additional.h:88
GNEChange_Additional::myParentEdges
const std::vector< GNEEdge * > & myParentEdges
reference to vector of parent edges
Definition: GNEChange_Additional.h:79
GNEChange_Additional::myParentDemandElements
const std::vector< GNEDemandElement * > & myParentDemandElements
reference to vector of parent demand elements
Definition: GNEChange_Additional.h:91
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEChange_Additional::myChildAdditionals
const std::vector< GNEAdditional * > & myChildAdditionals
reference to vector of child additional
Definition: GNEChange_Additional.h:103
GNEShape
Definition: GNEShape.h:34
GNEChange_Additional::myParentLanes
const std::vector< GNELane * > & myParentLanes
reference to vector of parent lanes
Definition: GNEChange_Additional.h:82
GNEChange_Additional::~GNEChange_Additional
~GNEChange_Additional()
Destructor.
Definition: GNEChange_Additional.cpp:58
GNEChange_Additional::myChildDemandElements
const std::vector< GNEDemandElement * > & myChildDemandElements
reference to vector of child demand elements
Definition: GNEChange_Additional.h:106
GNEChange_Additional::myParentShapes
const std::vector< GNEShape * > & myParentShapes
reference to vector of parent shapes
Definition: GNEChange_Additional.h:85
GNEChange_Additional::myChildShapes
const std::vector< GNEShape * > & myChildShapes
reference to vector of child shapes
Definition: GNEChange_Additional.h:100
GNEChange_Additional::myAdditional
GNEAdditional * myAdditional
full information regarding the additional element that is to be created/deleted
Definition: GNEChange_Additional.h:76
config.h
GNEChange_Additional::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Additional.cpp:270
GNEChange_Additional::undo
void undo()
undo action
Definition: GNEChange_Additional.cpp:106
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
GNEChange_Additional::myChildEdges
const std::vector< GNEEdge * > & myChildEdges
reference to vector of child edges
Definition: GNEChange_Additional.h:94
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEChange_Additional::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Additional.cpp:280
GNEChange_Additional::GNEChange_Additional
GNEChange_Additional(GNEAdditional *additional, bool forward)
Constructor for creating/deleting an additional element.
Definition: GNEChange_Additional.cpp:41