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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // The reification of a NETEDIT editing operation (see command pattern)
18 // inherits from FXCommand and is used to for undo/redo
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #include "GNEChange.h"
31 #include "GNENet.h"
32 
33 
34 // ===========================================================================
35 // FOX-declarations
36 // ===========================================================================
37 FXIMPLEMENT_ABSTRACT(GNEChange, FXCommand, NULL, 0)
38 
39 // ===========================================================================
40 // member method definitions
41 // ===========================================================================
42 
43 GNEChange::GNEChange(GNENet* net, bool forward) :
44  myNet(net),
45  myForward(forward) {}
46 
47 
49 
50 
51 FXuint
52 GNEChange::size() const {
53  return 1;
54 }
55 
56 
57 FXString
59  return "Undo";
60 }
61 
62 
63 FXString
65  return "Redo";
66 }
67 
68 
69 void
71 
72 
73 void
75 
76 
77 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
virtual void undo()
undo action/operation
Definition: GNEChange.cpp:70
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:91
virtual FXuint size() const
return actual size
Definition: GNEChange.cpp:52
~GNEChange()
Destructor.
Definition: GNEChange.cpp:48
virtual void redo()
redo action/operation
Definition: GNEChange.cpp:74
virtual FXString undoName() const
return undoName
Definition: GNEChange.cpp:58
virtual FXString redoName() const
return rendoName
Definition: GNEChange.cpp:64