vtkSMPropertyModificationUndoElement.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPropertyModificationUndoElement.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkSMPropertyModificationUndoElement_h
26 #define vtkSMPropertyModificationUndoElement_h
27 
28 #include "vtkRemotingServerManagerModule.h" // needed for exports
29 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
30 #include "vtkSMUndoElement.h"
31 class vtkSMProxy;
32 
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  int Undo() override;
44 
48  int Redo() override;
49 
53  void ModifiedProperty(vtkSMProxy* proxy, const char* propertyname);
54 
63  bool Merge(vtkUndoElement* vtkNotUsed(new_element)) override;
64 
65 protected:
68 
69  int RevertToState();
70 
71  vtkSetStringMacro(PropertyName);
72 
73  vtkTypeUInt32 ProxyGlobalID;
74  char* PropertyName;
76 
77 private:
79  void operator=(const vtkSMPropertyModificationUndoElement&) = delete;
80 };
81 
82 #endif
unit undo-redo-able operation.
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
virtual int Undo()=0
Undo the operation encapsulated by this element.
virtual bool Merge(vtkUndoElement *vtkNotUsed(new_element))
Called on the older element in the UndoSet to merge with the element being added if both the elements...
virtual int Redo()=0
Redo the operation encaspsulated by this element.
This is the concrete implementation for the Undo element for a property modification event...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
static vtkObject * New()
abstract superclass for Server Manager undo elements.