vtkUndoSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkUndoSet_h
21 #define vtkUndoSet_h
22 
23 #include "vtkObject.h"
24 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
25 
26 class vtkCollection;
27 class vtkPVXMLElement;
28 class vtkUndoElement;
29 
31 {
32 public:
33  static vtkUndoSet* New();
34  vtkTypeMacro(vtkUndoSet, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
40  virtual int Undo();
41 
45  virtual int Redo();
46 
55  int AddElement(vtkUndoElement* elem);
56 
60  void RemoveElement(int index);
61 
65  vtkUndoElement* GetElement(int index);
66 
70  void RemoveAllElements();
71 
75  int GetNumberOfElements();
76 
77 protected:
78  vtkUndoSet();
79  ~vtkUndoSet() override;
80 
83 
84 private:
85  vtkUndoSet(const vtkUndoSet&) = delete;
86  void operator=(const vtkUndoSet&) = delete;
87 };
88 
89 #endif
unit undo-redo-able operation.
vtkCollection * TmpWorkingCollection
Definition: vtkUndoSet.h:82
#define VTKPVVTKEXTENSIONSCORE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkCollection * Collection
Definition: vtkUndoSet.h:81
Maintains a collection of vtkUndoElement that can be undone/redone in a single step.
Definition: vtkUndoSet.h:30
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
void operator=(const vtkObjectBase &)