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-2016 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 #ifdef CHECK_MEMORY_LEAKS
35 #include <foreign/nvwa/debug_new.h>
36 #endif
37 
38 
39 // ===========================================================================
40 // FOX-declarations
41 // ===========================================================================
42 FXIMPLEMENT_ABSTRACT(GNEChange, FXCommand, NULL, 0)
43 
44 // ===========================================================================
45 // member method definitions
46 // ===========================================================================
47 
48 GNEChange::GNEChange(GNENet* net, bool forward) :
49  myNet(net),
50  myForward(forward) {}
51 
52 
54 
55 
56 FXuint
57 GNEChange::size() const {
58  return 1;
59 }
60 
61 
62 FXString
64  return "Undo";
65 }
66 
67 
68 FXString
70  return "Redo";
71 }
72 
73 
74 void
76 
77 
78 void
80 
81 
82 /****************************************************************************/
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
virtual void undo()
undo action/operation
Definition: GNEChange.cpp:75
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:87
virtual FXuint size() const
return actual size
Definition: GNEChange.cpp:57
~GNEChange()
Destructor.
Definition: GNEChange.cpp:53
virtual void redo()
redo action/operation
Definition: GNEChange.cpp:79
virtual FXString undoName() const
return undoName
Definition: GNEChange.cpp:63
virtual FXString redoName() const
return rendoName
Definition: GNEChange.cpp:69