SUMO - Simulation of Urban MObility
GNEChange.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 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 // The reification of a NETEDIT editing operation (see command pattern)
16 // inherits from FXCommand and is used to for undo/redo
17 /****************************************************************************/
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #include <netedit/GNENet.h>
25 
26 #include "GNEChange.h"
27 
28 // ===========================================================================
29 // FOX-declarations
30 // ===========================================================================
31 FXIMPLEMENT_ABSTRACT(GNEChange, FXCommand, nullptr, 0)
32 
33 // ===========================================================================
34 // member method definitions
35 // ===========================================================================
36 
37 GNEChange::GNEChange(GNENet* net, bool forward) :
38  myNet(net),
39  myForward(forward) {}
40 
41 
43 
44 
45 FXuint
46 GNEChange::size() const {
47  return 1;
48 }
49 
50 
51 FXString
53  return "Undo";
54 }
55 
56 
57 FXString
59  return "Redo";
60 }
61 
62 
63 void
65 
66 
67 void
69 
70 
71 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
virtual void undo()
undo action/operation
Definition: GNEChange.cpp:64
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:80
virtual FXuint size() const
return actual size
Definition: GNEChange.cpp:46
~GNEChange()
Destructor.
Definition: GNEChange.cpp:42
virtual void redo()
redo action/operation
Definition: GNEChange.cpp:68
virtual FXString undoName() const
return undoName
Definition: GNEChange.cpp:52
virtual FXString redoName() const
return rendoName
Definition: GNEChange.cpp:58