VTK  9.7.1
vtkInformationVector.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkInformationVector_h
21 #define vtkInformationVector_h
22 
23 #include "vtkCommonCoreModule.h" // For export macro
24 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25 
26 #include "vtkObject.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkInformation;
30 class vtkInformationVectorInternals;
31 
32 class VTKCOMMONCORE_EXPORT VTK_MARSHALAUTO vtkInformationVector : public vtkObject
33 {
34 public:
35  static vtkInformationVector* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
46  int GetNumberOfInformationObjects() { return this->NumberOfInformationObjects; }
47  void SetNumberOfInformationObjects(int n);
49 
51 
57  void SetInformationObject(int index, vtkInformation* info);
58  vtkInformation* GetInformationObject(int index);
60 
62 
65  void Append(vtkInformation* info);
66  void Remove(vtkInformation* info);
67  void Remove(int idx);
69 
71 
74  bool UsesGarbageCollector() const override { return true; }
76 
84  void Copy(vtkInformationVector* from, vtkTypeBool deep = 0);
85 
86 protected:
88  ~vtkInformationVector() override;
89 
90  // Internal implementation details.
91  vtkInformationVectorInternals* Internal;
92 
94 
95  // Garbage collection support.
96  void ReportReferences(vtkGarbageCollector*) override;
97 
98 private:
100  void operator=(const vtkInformationVector&) = delete;
101 };
102 
103 VTK_ABI_NAMESPACE_END
104 #endif
int GetNumberOfInformationObjects()
Get/Set the number of information objects in the vector.
abstract base class for most VTK objects
Definition: vtkObject.h:52
bool UsesGarbageCollector() const override
Initiate garbage collection when a reference is removed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
Detect and break reference loops.
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void ReportReferences(vtkGarbageCollector *)
vtkInformationVectorInternals * Internal
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...