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-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 connection is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_Connection_h
18 #define GNEChange_Connection_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
27 #include <string>
29 #include <netbuild/NBEdge.h>
30 #include "GNEChange.h"
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class GNEEdge;
36 class GNEConnection;
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
46  FXDECLARE_ABSTRACT(GNEChange_Connection)
47 
48 public:
49 
56  GNEChange_Connection(GNEEdge* edge, NBEdge::Connection nbCon, bool selected, bool forward);
57 
60 
64  FXString undoName() const;
65 
67  FXString redoName() const;
68 
70  void undo();
71 
73  void redo();
75 
76 
77 private:
78  // @brief the connection object to be removed/re-added
80 
83 
85  bool mySelected;
86 };
87 
88 #endif
89 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:160
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:50
GNEChange_Connection(GNEEdge *edge, NBEdge::Connection nbCon, bool selected, bool forward)
Constructor for creating/deleting a connection.