VTK  9.3.20240418
vtkOverrideInformationCollection.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
16 #ifndef vtkOverrideInformationCollection_h
17 #define vtkOverrideInformationCollection_h
18 
19 #include "vtkCollection.h"
20 #include "vtkCommonCoreModule.h" // For export macro
21 
22 #include "vtkOverrideInformation.h" // Needed for inline methods
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class VTKCOMMONCORE_EXPORT vtkOverrideInformationCollection : public vtkCollection
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
36 
40  vtkOverrideInformation* GetNextItem();
41 
47  {
48  return static_cast<vtkOverrideInformation*>(this->GetNextItemAsObject(cookie));
49  }
50 
51 protected:
53  ~vtkOverrideInformationCollection() override = default;
54 
55 private:
56  // hide the standard AddItem from the user and the compiler.
57  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
58 
60  void operator=(const vtkOverrideInformationCollection&) = delete;
61 };
62 
64 {
65  this->vtkCollection::AddItem(f);
66 }
67 
69 {
70  return static_cast<vtkOverrideInformation*>(this->GetNextItemAsObject());
71 }
72 
73 VTK_ABI_NAMESPACE_END
74 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:46
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:162
maintain a list of override information objects
vtkOverrideInformation * GetNextItem()
Get the next OverrideInformation in the list.
~vtkOverrideInformationCollection() override=default
static vtkOverrideInformationCollection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOverrideInformation * GetNextOverrideInformation(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkOverrideInformation *)
Add a OverrideInformation to the list.
Factory object override information.
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:41