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