VTK  9.3.0
vtkPolyDataCollection.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
23 #ifndef vtkPolyDataCollection_h
24 #define vtkPolyDataCollection_h
25 
26 #include "vtkCollection.h"
27 #include "vtkCommonDataModelModule.h" // For export macro
28 
29 #include "vtkPolyData.h" // Needed for static cast
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  void AddItem(vtkPolyData* pd) { this->vtkCollection::AddItem(pd); }
43 
47  vtkPolyData* GetNextItem() { return static_cast<vtkPolyData*>(this->GetNextItemAsObject()); }
48 
54  {
55  return static_cast<vtkPolyData*>(this->GetNextItemAsObject(cookie));
56  }
57 
58 protected:
59  vtkPolyDataCollection() = default;
60  ~vtkPolyDataCollection() override = default;
61 
62 private:
63  // hide the standard AddItem from the user and the compiler.
64  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
65 
67  void operator=(const vtkPolyDataCollection&) = delete;
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
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:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
maintain a list of polygonal data objects
vtkPolyData * GetNextPolyData(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkPolyData *pd)
Add a poly data to the bottom of the list.
vtkPolyDataCollection()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * GetNextItem()
Get the next poly data in the list.
static vtkPolyDataCollection * New()
~vtkPolyDataCollection() override=default
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40