SUMO - Simulation of Urban MObility
GNEChange_Crossing.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-2018 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 crossing is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Crossing_h
18 #define GNEChange_Crossing_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
29 #include <netbuild/NBNode.h>
30 #include <vector>
31 #include <map>
32 #include "GNEChange.h"
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class GNENet;
38 class GNEJunction;
39 class GNECrossing;
40 class NBEdge;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
49 class GNEChange_Crossing : public GNEChange {
50  // @brief FOX Declaration
51  FXDECLARE_ABSTRACT(GNEChange_Crossing)
52 
53 public:
62  GNEChange_Crossing(GNEJunction* junctionParent, const std::vector<NBEdge*>& edges, double width,
63  bool priority, int customTLIndex, int customTLIndex2, const PositionVector& customShape, bool selected, bool forward);
64 
67  GNEChange_Crossing(GNEJunction* junctionParent, const NBNode::Crossing& crossing, bool forward);
68 
71 
75  FXString undoName() const;
76 
78  FXString redoName() const;
79 
81  void undo();
82 
84  void redo();
86 
87 private:
90 
92  std::vector<NBEdge*> myEdges;
93 
95  double myWidth;
96 
98  bool myPriority;
99 
102 
105 
108 
111 };
112 
113 #endif
114 /****************************************************************************/
int myCustomTLIndex
custom index of GNECrossing
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
The representation of a single edge during network building.
Definition: NBEdge.h:65
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
bool mySelected
flag to check if crossing is selected
GNEChange_Crossing(GNEJunction *junctionParent, const std::vector< NBEdge *> &edges, double width, bool priority, int customTLIndex, int customTLIndex2, const PositionVector &customShape, bool selected, bool forward)
Constructor for creating/deleting an crossing.
PositionVector myCustomShape
priority of GNECrossing
void redo()
redo action
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:45
A list of positions.
GNEJunction * myJunctionParent
full information regarding the Junction in which GNECRossing is created
FXString undoName() const
return undoName
~GNEChange_Crossing()
Destructor.
bool myPriority
priority of GNECrossing
std::vector< NBEdge * > myEdges
vector to save all edges of GNECrossing
int myCustomTLIndex2
custom index of GNECrossing (reverse direction)
void undo()
undo action
A definition of a pedestrian crossing.
Definition: NBNode.h:125
double myWidth
width of GNECrossing
FXString redoName() const
get Redo name