Eclipse SUMO - Simulation of Urban MObility
GNEChange_DemandElement.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 demand element element is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_DemandElement_h
17 #define GNEChange_DemandElement_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 class GNEXMLChild;
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
46  FXDECLARE_ABSTRACT(GNEChange_DemandElement)
47 
48 public:
53  GNEChange_DemandElement(GNEDemandElement* demandElement, 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*>& myEdgePath;
81 
83  const std::vector<GNEEdge*>& myParentEdges;
84 
86  const std::vector<GNELane*>& myParentLanes;
87 
89  const std::vector<GNEShape*>& myParentShapes;
90 
92  const std::vector<GNEAdditional*>& myParentAdditionals;
93 
95  const std::vector<GNEDemandElement*>& myParentDemandElements;
96 
98  const std::vector<GNEEdge*>& myChildEdges;
99 
101  const std::vector<GNELane*>& myChildLanes;
102 
104  const std::vector<GNEShape*>& myChildShapes;
105 
107  const std::vector<GNEAdditional*>& myChildAdditionals;
108 
110  const std::vector<GNEDemandElement*>& myChildDemandElements;
111 };
112 
113 #endif
114 /****************************************************************************/
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_DemandElement
Definition: GNEChange_DemandElement.h:45
GNEChange_DemandElement::myEdgePath
const std::vector< GNEEdge * > & myEdgePath
reference to edge path vector
Definition: GNEChange_DemandElement.h:80
GNEChange_DemandElement::myChildShapes
const std::vector< GNEShape * > & myChildShapes
reference to vector of child shapes
Definition: GNEChange_DemandElement.h:104
GNEChange.h
GNEChange_DemandElement::undo
void undo()
undo action
Definition: GNEChange_DemandElement.cpp:113
GNEViewNet
Definition: GNEViewNet.h:42
GNEChange_DemandElement::myParentShapes
const std::vector< GNEShape * > & myParentShapes
reference to vector of parent shapes
Definition: GNEChange_DemandElement.h:89
GNEChange_DemandElement::myParentAdditionals
const std::vector< GNEAdditional * > & myParentAdditionals
reference to vector of parent additionals
Definition: GNEChange_DemandElement.h:92
GNEChange_DemandElement::undoName
FXString undoName() const
return undoName
Definition: GNEChange_DemandElement.cpp:293
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEShape
Definition: GNEShape.h:34
GNEChange_DemandElement::myParentLanes
const std::vector< GNELane * > & myParentLanes
reference to vector of parent lanes
Definition: GNEChange_DemandElement.h:86
GNEChange_DemandElement::redo
void redo()
redo action
Definition: GNEChange_DemandElement.cpp:203
GNEChange_DemandElement::myChildDemandElements
const std::vector< GNEDemandElement * > & myChildDemandElements
reference to vector of child demand elements
Definition: GNEChange_DemandElement.h:110
GNEChange_DemandElement::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_DemandElement.cpp:303
GNEChange_DemandElement::myDemandElement
GNEDemandElement * myDemandElement
full information regarding the demand element element that is to be created/deleted
Definition: GNEChange_DemandElement.h:77
GNEChange_DemandElement::~GNEChange_DemandElement
~GNEChange_DemandElement()
Destructor.
Definition: GNEChange_DemandElement.cpp:61
GNEChange_DemandElement::myParentDemandElements
const std::vector< GNEDemandElement * > & myParentDemandElements
reference to vector of parent demand elements
Definition: GNEChange_DemandElement.h:95
GNEChange_DemandElement::myChildLanes
const std::vector< GNELane * > & myChildLanes
reference to vector of child lanes
Definition: GNEChange_DemandElement.h:101
GNEChange_DemandElement::myParentEdges
const std::vector< GNEEdge * > & myParentEdges
reference to vector of parent edges
Definition: GNEChange_DemandElement.h:83
config.h
GNEChange_DemandElement::myChildEdges
const std::vector< GNEEdge * > & myChildEdges
reference to vector of child edges
Definition: GNEChange_DemandElement.h:98
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEChange_DemandElement::myChildAdditionals
const std::vector< GNEAdditional * > & myChildAdditionals
reference to vector of child additional
Definition: GNEChange_DemandElement.h:107
GNEChange_DemandElement::GNEChange_DemandElement
GNEChange_DemandElement(GNEDemandElement *demandElement, bool forward)
Constructor for creating/deleting an demand element element.
Definition: GNEChange_DemandElement.cpp:43