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
14#ifndef vtkPolyDataCollection_h
15#define vtkPolyDataCollection_h
16
17#include "vtkCollection.h"
18#include "vtkCommonDataModelModule.h" // For export macro
19
20#include "vtkPolyData.h" // Needed for static cast
21
22VTK_ABI_NAMESPACE_BEGIN
23class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
34
38 vtkPolyData* GetNextItem() { return static_cast<vtkPolyData*>(this->GetNextItemAsObject()); }
39
45 {
46 return static_cast<vtkPolyData*>(this->GetNextItemAsObject(cookie));
47 }
48
49protected:
51 ~vtkPolyDataCollection() override = default;
52
53private:
54 // hide the standard AddItem from the user and the compiler.
55 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
56
58 void operator=(const vtkPolyDataCollection&) = delete;
59};
60
61VTK_ABI_NAMESPACE_END
62#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:29
abstract base class for most VTK objects
Definition vtkObject.h:49
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
Definition vtkPolyData.h:80
void * vtkCollectionSimpleIterator