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 /****************************************************************************/
14 // A network change in which a single connection is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_Connection_h
17 #define GNEChange_Connection_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <fx.h>
26 #include <string>
28 #include <netbuild/NBEdge.h>
29 #include "GNEChange.h"
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class GNEEdge;
35 class GNEConnection;
36 
37 // ===========================================================================
38 // class definitions
39 // ===========================================================================
45  FXDECLARE_ABSTRACT(GNEChange_Connection)
46 
47 public:
48 
55  GNEChange_Connection(GNEEdge* edge, NBEdge::Connection nbCon, bool selected, bool forward);
56 
59 
63  FXString undoName() const;
64 
66  FXString redoName() const;
67 
69  void undo();
70 
72  void redo();
74 
75 
76 private:
77  // @brief the connection object to be removed/re-added
79 
82 
84  bool mySelected;
85 };
86 
87 #endif
88 /****************************************************************************/
fxexdefs.h
GNEChange_Connection::myEdge
GNEEdge * myEdge
Definition: GNEChange_Connection.h:78
GNEChange.h
GNEChange_Connection::undoName
FXString undoName() const
return undoName
Definition: GNEChange_Connection.cpp:98
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEChange_Connection
Definition: GNEChange_Connection.h:44
GNEChange_Connection::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_Connection.cpp:108
GNEChange_Connection::mySelected
bool mySelected
flag to indicates if crossing was previously selected
Definition: GNEChange_Connection.h:84
GNEChange_Connection::myNBEdgeConnection
NBEdge::Connection myNBEdgeConnection
the data which must be copied because the original reference does not persist
Definition: GNEChange_Connection.h:81
GNEChange_Connection::undo
void undo()
undo action
Definition: GNEChange_Connection.cpp:52
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:37
GNEChange_Connection::~GNEChange_Connection
~GNEChange_Connection()
Destructor.
Definition: GNEChange_Connection.cpp:46
NBEdge::Connection
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:189
GNEChange_Connection::redo
void redo()
redo action
Definition: GNEChange_Connection.cpp:75
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
NBEdge.h