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-2016 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 "GNEChange.h"
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class GNEEdge;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51  FXDECLARE_ABSTRACT(GNEChange_Connection)
52 
53 public:
60  GNEChange_Connection(GNEEdge* edge, int fromLane,
61  const std::string& toEdgeID, int toLane,
62  bool mayDefinitelyPass, 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  // @name full information regarding the lane that is to be created/deleted
85  // @briefwe assume shared responsibility for the pointers (via reference counting)
87  // @brief we need the edge because it is the target of our change commands
89 
92 
94  const std::string myToEdgeID;
95 
97  int myToLane;
99 
101  bool myPass;
102 };
103 
104 #endif
105 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
int myToLane
the target lane of the connection
~GNEChange_Connection()
Destructor.
FXString undoName() const
return undoName
GNEChange_Connection(GNEEdge *edge, int fromLane, const std::string &toEdgeID, int toLane, bool mayDefinitelyPass, bool forward)
Constructor for creating/deleting an edge.
const std::string myToEdgeID
the id of the target edge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:54
bool myPass
whether this connection never yields
FXString redoName() const
get Redo name
int myFromLane
the lane from which the connection originates