SUMO - Simulation of Urban MObility
GNEChange_Connection.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 connection is created or deleted
18 /****************************************************************************/
19 #ifndef GNEChange_Connection_h
20 #define GNEChange_Connection_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>
33 #include <string>
35 #include <netbuild/NBEdge.h>
36 #include "GNEChange.h"
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class GNEEdge;
42 class GNEConnection;
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
52  FXDECLARE_ABSTRACT(GNEChange_Connection)
53 
54 public:
55 
62  GNEChange_Connection(GNEEdge* edge, NBEdge::Connection nbCon, bool selected, bool forward);
63 
66 
70  FXString undoName() const;
71 
73  FXString redoName() const;
74 
76  void undo();
77 
79  void redo();
81 
82 
83 private:
84  // @brief the connection object to be removed/re-added
86 
89 
91  bool mySelected;
92 };
93 
94 #endif
95 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:161
bool mySelected
flag to indicates if crossing was previously selected
~GNEChange_Connection()
Destructor.
NBEdge::Connection myNBEdgeConnection
the data which must be copied because the original reference does not persist
FXString redoName() const
get Redo name
FXString undoName() const
return undoName
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:56
GNEChange_Connection(GNEEdge *edge, NBEdge::Connection nbCon, bool selected, bool forward)
Constructor for creating/deleting a connection.