SUMO - Simulation of Urban MObility
GNEChange_Crossing.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which a single crossing is created or deleted
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNEChange_Crossing_h
21 #define GNEChange_Crossing_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #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:
65  GNEChange_Crossing(GNEJunction* junctionParent, const std::vector<NBEdge*>& edges, double width, bool priority, bool forward);
66 
69 
73  FXString undoName() const;
74 
76  FXString redoName() const;
77 
79  void undo();
80 
82  void redo();
84 
85 private:
88 
90  std::vector<NBEdge*> myEdges;
91 
93  double myWidth;
94 
96  bool myPriority;
97 };
98 
99 #endif
100 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
The representation of a single edge during network building.
Definition: NBEdge.h:71
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
void redo()
redo action
GNEChange_Crossing(GNEJunction *junctionParent, const std::vector< NBEdge *> &edges, double width, bool priority, bool forward)
Constructor for creating/deleting an crossing.
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