Eclipse SUMO - Simulation of Urban MObility
GNEChange_EnableAttribute.h
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 // A network change in which the attribute of some object is modified
16 /****************************************************************************/
17 #ifndef GNEChange_EnableAttribute_h
18 #define GNEChange_EnableAttribute_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include "GNEChange.h"
27 
28 // ===========================================================================
29 // class declarations
30 // ===========================================================================
32 class GNENetElement;
33 class GNEAdditional;
34 class GNEDemandElement;
35 class GNEShape;
36 class GNENet;
37 
38 // ===========================================================================
39 // class definitions
40 // ===========================================================================
46  FXDECLARE_ABSTRACT(GNEChange_EnableAttribute)
47 
48 public:
55  GNEChange_EnableAttribute(GNEAttributeCarrier* ac, GNENet* net, const int originalAttributes, const int newAttributes);
56 
59 
63  FXString undoName() const;
64 
66  FXString redoName() const;
67 
69  void undo();
70 
72  void redo();
74 
75 private:
80 
83 
85  const int myNewAttributes;
86 };
87 
88 #endif
89 /****************************************************************************/
GNEDemandElement
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEDemandElement.h:54
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
GNEChange_EnableAttribute::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_EnableAttribute.cpp:109
GNEChange_EnableAttribute::redo
void redo()
redo action
Definition: GNEChange_EnableAttribute.cpp:86
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
GNEChange.h
GNEChange_EnableAttribute::undoName
FXString undoName() const
return undoName
Definition: GNEChange_EnableAttribute.cpp:103
GNEChange_EnableAttribute::myOriginalAttributes
const int myOriginalAttributes
original attributes
Definition: GNEChange_EnableAttribute.h:82
GNEShape
Definition: GNEShape.h:35
GNEChange_EnableAttribute::GNEChange_EnableAttribute
GNEChange_EnableAttribute(GNEAttributeCarrier *ac, GNENet *net, const int originalAttributes, const int newAttributes)
Constructor.
Definition: GNEChange_EnableAttribute.cpp:37
GNEChange_EnableAttribute::~GNEChange_EnableAttribute
~GNEChange_EnableAttribute()
Destructor.
Definition: GNEChange_EnableAttribute.cpp:46
GNEChange_EnableAttribute
the function-object for an editing operation (abstract base)
Definition: GNEChange_EnableAttribute.h:45
GNENetElement
Definition: GNENetElement.h:42
GNEChange_EnableAttribute::myAC
GNEAttributeCarrier * myAC
the net to which all operations shall be applied
Definition: GNEChange_EnableAttribute.h:79
GNEChange_EnableAttribute::undo
void undo()
undo action
Definition: GNEChange_EnableAttribute.cpp:69
GNEChange_EnableAttribute::myNewAttributes
const int myNewAttributes
original attributes
Definition: GNEChange_EnableAttribute.h:85
config.h
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54