Eclipse 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-2019 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 /****************************************************************************/
fxexdefs.h
GNEChange_Connection::myEdge
GNEEdge * myEdge
Definition: GNEChange_Connection.h:79
GNEChange.h
GNEChange_Connection::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Connection.cpp:99
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEChange_Connection
Definition: GNEChange_Connection.h:45
GNEChange_Connection::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Connection.cpp:109
GNEChange_Connection::mySelected
bool mySelected
flag to indicates if crossing was previously selected
Definition: GNEChange_Connection.h:85
GNEChange_Connection::myNBEdgeConnection
NBEdge::Connection myNBEdgeConnection
the data which must be copied because the original reference does not persist
Definition: GNEChange_Connection.h:82
GNEChange_Connection::undo
void undo()
undo action
Definition: GNEChange_Connection.cpp:53
GNEConnection
Definition: GNEConnection.h:38
config.h
GNEChange_Connection::GNEChange_Connection
GNEChange_Connection(GNEEdge *edge, NBEdge::Connection nbCon, bool selected, bool forward)
Constructor for creating/deleting a connection.
Definition: GNEChange_Connection.cpp:38
GNEChange_Connection::~GNEChange_Connection
~GNEChange_Connection()
Destructor.
Definition: GNEChange_Connection.cpp:47
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:184
GNEChange_Connection::redo
void redo()
redo action
Definition: GNEChange_Connection.cpp:76
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
NBEdge.h