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-2016 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:
61  const SumoXMLAttr key,
62  const std::string& value,
63  bool customOrigValue = false,
64  const std::string& origValue = "");
65 
66 
69 
73  FXString undoName() const;
74 
76  FXString redoName() const;
77 
79  void undo();
80 
82  void redo();
84 
86  bool trueChange();
87 
88 private:
93 
96 
98  std::string myOrigValue;
99 
101  std::string myNewValue;
102 
103 };
104 
105 #endif
106 /****************************************************************************/
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 (we are not responsible for the pointer) ...
std::string myOrigValue
the original value