VTK  9.4.20250102
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
43#ifndef vtkPolyDataCollection_h
44#define vtkPolyDataCollection_h
45
46#include "vtkCollection.h"
47#include "vtkCommonDataModelModule.h" // For export macro
48
49#include "vtkPolyData.h" // Needed for static cast
50
51VTK_ABI_NAMESPACE_BEGIN
52class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
63
67 vtkPolyData* GetNextItem() { return static_cast<vtkPolyData*>(this->GetNextItemAsObject()); }
68
74 {
75 return static_cast<vtkPolyData*>(this->GetNextItemAsObject(cookie));
76 }
77
78protected:
80 ~vtkPolyDataCollection() override = default;
81
82private:
83 // hide the standard AddItem from the user and the compiler.
84 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
85
87 void operator=(const vtkPolyDataCollection&) = delete;
88};
89
90VTK_ABI_NAMESPACE_END
91#endif
create and manipulate ordered lists of objects
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 polygonal data objects
vtkPolyData * GetNextItem()
Get the next poly data in the list.
static vtkPolyDataCollection * New()
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 * GetNextPolyData(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
~vtkPolyDataCollection() override=default
concrete dataset represents vertices, lines, polygons, and triangle strips
void * vtkCollectionSimpleIterator