Eclipse 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-2019 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 
25 #include "GNEChange.h"
26 
27 // ===========================================================================
28 // FOX-declarations
29 // ===========================================================================
30 FXIMPLEMENT_ABSTRACT(GNEChange, FXCommand, nullptr, 0)
31 
32 // ===========================================================================
33 // member method definitions
34 // ===========================================================================
35 
36 GNEChange::GNEChange(GNENet* net, bool forward) :
37  myNet(net),
38  myForward(forward) {}
39 
40 
42 
43 
44 FXuint
45 GNEChange::size() const {
46  return 1;
47 }
48 
49 
50 FXString
52  return "Undo";
53 }
54 
55 
56 FXString
58  return "Redo";
59 }
60 
61 
62 void
64 
65 
66 void
68 
69 
70 /****************************************************************************/
GNEChange::size
virtual FXuint size() const
return actual size
Definition: GNEChange.cpp:45
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
GNEChange::undoName
virtual FXString undoName() const
return undoName
Definition: GNEChange.cpp:51
GNEChange.h
GNEChange::~GNEChange
~GNEChange()
Destructor.
Definition: GNEChange.cpp:41
GNEChange::redoName
virtual FXString redoName() const
return rendoName
Definition: GNEChange.cpp:57
GNEChange::undo
virtual void undo()
undo action/operation
Definition: GNEChange.cpp:63
config.h
GNEChange::redo
virtual void redo()
redo action/operation
Definition: GNEChange.cpp:67
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43