SUMO - Simulation of Urban MObility
GNEChange_Attribute.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which the attribute of some object is modified
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNEChange_Attribute_h
21 #define GNEChange_Attribute_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <fx.h>
36 #include "GNEChange.h"
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
51  FXDECLARE_ABSTRACT(GNEChange_Attribute)
52 
53 public:
60  const SumoXMLAttr key,
61  const std::string& value,
62  bool customOrigValue = false,
63  const std::string& origValue = "");
64 
65 
68 
72  FXString undoName() const;
73 
75  FXString redoName() const;
76 
78  void undo();
79 
81  void redo();
83 
85  bool trueChange();
86 
87 private:
92 
95 
97  std::string myOrigValue;
98 
100  std::string myNewValue;
101 
102 };
103 
104 #endif
105 /****************************************************************************/
void redo()
redo action
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:49
GNEChange_Attribute(GNEAttributeCarrier *ac, const SumoXMLAttr key, const std::string &value, bool customOrigValue=false, const std::string &origValue="")
Constructor.
SumoXMLAttr myKey
The attribute name.
void undo()
undo action
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
the function-object for an editing operation (abstract base)
bool trueChange()
wether original and new value differ
std::string myNewValue
the original value
~GNEChange_Attribute()
Destructor.
FXString undoName() const
return undoName
FXString redoName() const
get Redo name
GNEAttributeCarrier * myAC
the net to which all operations shall be applied
std::string myOrigValue
the original value