VTK  9.2.6
vtkPolyDataCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkPolyDataCollection_h
36 #define vtkPolyDataCollection_h
37 
38 #include "vtkCollection.h"
39 #include "vtkCommonDataModelModule.h" // For export macro
40 
41 #include "vtkPolyData.h" // Needed for static cast
42 
43 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
53  void AddItem(vtkPolyData* pd) { this->vtkCollection::AddItem(pd); }
54 
58  vtkPolyData* GetNextItem() { return static_cast<vtkPolyData*>(this->GetNextItemAsObject()); }
59 
65  {
66  return static_cast<vtkPolyData*>(this->GetNextItemAsObject(cookie));
67  }
68 
69 protected:
70  vtkPolyDataCollection() = default;
71  ~vtkPolyDataCollection() override = default;
72 
73 private:
74  // hide the standard AddItem from the user and the compiler.
75  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
76 
77 private:
79  void operator=(const vtkPolyDataCollection&) = delete;
80 };
81 
82 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:56
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:49
abstract base class for most VTK objects
Definition: vtkObject.h:72
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:100
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:51