SUMO - Simulation of Urban MObility
GNEChange_Connection.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which a single connection 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_Connection_h
21 #define GNEChange_Connection_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>
34 #include <string>
36 #include <netbuild/NBEdge.h>
37 #include "GNEChange.h"
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
42 class GNEEdge;
43 class GNEConnection;
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
53  FXDECLARE_ABSTRACT(GNEChange_Connection)
54 
55 public:
56 
63  GNEChange_Connection(GNEEdge* edge, NBEdge::Connection nbCon, bool selected, bool forward);
64 
67 
71  FXString undoName() const;
72 
74  FXString redoName() const;
75 
77  void undo();
78 
80  void redo();
82 
83 
84 private:
85  // @brief the connection object to be removed/re-added
87 
90 
92  bool mySelected;
93 };
94 
95 #endif
96 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:165
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 undoName() const
return undoName
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:58
GNEChange_Connection(GNEEdge *edge, NBEdge::Connection nbCon, bool selected, bool forward)
Constructor for creating/deleting a connection.
FXString redoName() const
get Redo name