ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkUndoSet.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "qPCL.h" // needed for export macro
11 #include "vtkObject.h"
12 
13 class vtkCollection;
14 class vtkPVXMLElement;
15 class vtkUndoElement;
16 
17 class QPCL_ENGINE_LIB_API vtkUndoSet : public vtkObject {
18 public:
19  static vtkUndoSet* New();
20  vtkTypeMacro(vtkUndoSet, vtkObject);
21  void PrintSelf(ostream& os, vtkIndent indent) override;
22 
26  virtual int Undo();
27 
31  virtual int Redo();
32 
41  int AddElement(vtkUndoElement* elem);
42 
46  void RemoveElement(int index);
47 
51  vtkUndoElement* GetElement(int index);
52 
56  void RemoveAllElements();
57 
61  int GetNumberOfElements();
62 
63 protected:
64  vtkUndoSet();
65  ~vtkUndoSet() override;
66 
67  vtkCollection* Collection;
68  vtkCollection* TmpWorkingCollection;
69 
70 private:
71  vtkUndoSet(const vtkUndoSet&) = delete;
72  void operator=(const vtkUndoSet&) = delete;
73 };
vtkCollection * Collection
Definition: vtkUndoSet.h:67
vtkCollection * TmpWorkingCollection
Definition: vtkUndoSet.h:68
static vtkUndoSet * New()
vtkTypeMacro(vtkUndoSet, vtkObject)
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15