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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // A network change in which a single crossing is created or deleted
18 /****************************************************************************/
19 #ifndef GNEChange_Crossing_h
20 #define GNEChange_Crossing_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <fx.h>
35 #include <vector>
36 #include <map>
37 #include "GNEChange.h"
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class GNENet;
43 class GNEJunction;
44 class NBEdge;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
53 class GNEChange_Crossing : public GNEChange {
54  // @brief FOX Declaration
55  FXDECLARE_ABSTRACT(GNEChange_Crossing)
56 
57 public:
66  GNEChange_Crossing(GNEJunction* junctionParent, const std::vector<NBEdge*>& edges, double width,
67  bool priority, int customTLIndex, const PositionVector& customShape, bool selected, 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 };
109 
110 #endif
111 /****************************************************************************/
int myCustomTLIndex
custom index of GNECrossing
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
The representation of a single edge during network building.
Definition: NBEdge.h:70
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:91
GNEChange_Crossing(GNEJunction *junctionParent, const std::vector< NBEdge *> &edges, double width, bool priority, int customTLIndex, const PositionVector &customShape, bool selected, bool forward)
Constructor for creating/deleting an crossing.
bool mySelected
flag to indicates if crossing was previously selected
PositionVector myCustomShape
priority of GNECrossing
void redo()
redo action
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
void undo()
undo action
double myWidth
width of GNECrossing
FXString redoName() const
get Redo name