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-2015 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 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <fx.h>
33 #include <string>
35 #include "GNEChange.h"
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class GNEEdge;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
50  FXDECLARE_ABSTRACT(GNEChange_Connection)
51 
52 public:
59  GNEChange_Connection(GNEEdge* edge, unsigned int fromLane,
60  const std::string& toEdgeID, unsigned int toLane,
61  bool mayDefinitelyPass, bool forward);
62 
65 
66  FXString undoName() const;
67  FXString redoName() const;
68  void undo();
69  void redo();
70 
71 
72 private:
77  // we need the edge because it is the target of our change commands
79 
80  // @brief the lane from which the connection originates
81  unsigned int myFromLane;
82 
83  // @brief the id of the target edge
84  const std::string myToEdgeID;
85 
86  // @brief the target lane of the connection
87  unsigned int myToLane;
88 
89  // @brief whether this connection never yields
90  bool myPass;
91 
92 };
93 
94 #endif
95 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
GNEChange_Connection(GNEEdge *edge, unsigned int fromLane, const std::string &toEdgeID, unsigned int toLane, bool mayDefinitelyPass, bool forward)
Constructor for creating/deleting an edge.
~GNEChange_Connection()
Destructor.
FXString undoName() const
const std::string myToEdgeID
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:61
GNEEdge * myEdge
full information regarding the lane that is to be created/deleted we assume shared responsibility for...
FXString redoName() const