vtkUndoSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkUndoSet.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 =========================================================================*/
32 #ifndef vtkUndoSet_h
33 #define vtkUndoSet_h
34 
35 #include "vtkObject.h"
36 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
37 
38 class vtkCollection;
39 class vtkPVXMLElement;
40 class vtkUndoElement;
41 
43 {
44 public:
45  static vtkUndoSet* New();
46  vtkTypeMacro(vtkUndoSet, vtkObject);
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  virtual int Undo();
53 
57  virtual int Redo();
58 
67  int AddElement(vtkUndoElement* elem);
68 
72  void RemoveElement(int index);
73 
77  vtkUndoElement* GetElement(int index);
78 
82  void RemoveAllElements();
83 
87  int GetNumberOfElements();
88 
89 protected:
90  vtkUndoSet();
91  ~vtkUndoSet() override;
92 
95 
96 private:
97  vtkUndoSet(const vtkUndoSet&) = delete;
98  void operator=(const vtkUndoSet&) = delete;
99 };
100 
101 #endif
unit undo-redo-able operation.
vtkCollection * TmpWorkingCollection
Definition: vtkUndoSet.h:94
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkCollection * Collection
Definition: vtkUndoSet.h:93
Maintains a collection of vtkUndoElement that can be undone/redone in a single step.
Definition: vtkUndoSet.h:42
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
void operator=(const vtkObjectBase &)