SUMO - Simulation of Urban MObility
GNEChange.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 // The reification of a NETEDIT editing operation (see command pattern)
8 // inherits from FXCommand and is used to for undo/redo
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #include "GNEChange.h"
32 #include "GNENet.h"
33 
34 
35 // ===========================================================================
36 // FOX-declarations
37 // ===========================================================================
38 FXIMPLEMENT_ABSTRACT(GNEChange, FXCommand, NULL, 0)
39 
40 // ===========================================================================
41 // member method definitions
42 // ===========================================================================
43 
44 GNEChange::GNEChange(GNENet* net, bool forward) :
45  myNet(net),
46  myForward(forward) {}
47 
48 
50 
51 
52 FXuint
53 GNEChange::size() const {
54  return 1;
55 }
56 
57 
58 FXString
60  return "Undo";
61 }
62 
63 
64 FXString
66  return "Redo";
67 }
68 
69 
70 void
72 
73 
74 void
76 
77 
78 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
virtual void undo()
undo action/operation
Definition: GNEChange.cpp:71
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
virtual FXuint size() const
return actual size
Definition: GNEChange.cpp:53
~GNEChange()
Destructor.
Definition: GNEChange.cpp:49
virtual void redo()
redo action/operation
Definition: GNEChange.cpp:75
virtual FXString undoName() const
return undoName
Definition: GNEChange.cpp:59
virtual FXString redoName() const
return rendoName
Definition: GNEChange.cpp:65