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 <vector>
30 #include <map>
31 #include "GNEChange.h"
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class GNENet;
37 class GNEJunction;
38 class NBEdge;
39 
40 // ===========================================================================
41 // class definitions
42 // ===========================================================================
47 class GNEChange_Crossing : public GNEChange {
48  // @brief FOX Declaration
49  FXDECLARE_ABSTRACT(GNEChange_Crossing)
50 
51 public:
60  GNEChange_Crossing(GNEJunction* junctionParent, const std::vector<NBEdge*>& edges, double width,
61  bool priority, int customTLIndex, int customTLIndex2, const PositionVector& customShape, bool selected, bool forward);
62 
65 
69  FXString undoName() const;
70 
72  FXString redoName() const;
73 
75  void undo();
76 
78  void redo();
80 
81 private:
84 
86  std::vector<NBEdge*> myEdges;
87 
89  double myWidth;
90 
92  bool myPriority;
93 
96 
99 
102 
105 };
106 
107 #endif
108 /****************************************************************************/
int myCustomTLIndex
custom index of GNECrossing
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
The representation of a single edge during network building.
Definition: NBEdge.h:65
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:80
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
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
double myWidth
width of GNECrossing
FXString redoName() const
get Redo name