VTK
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 =========================================================================*/
26 #ifndef vtkPolyDataCollection_h
27 #define vtkPolyDataCollection_h
28 
29 #include "vtkCommonDataModelModule.h" // For export macro
30 #include "vtkCollection.h"
31 
32 #include "vtkPolyData.h" // Needed for static cast
33 
34 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
35 {
36 public:
37  static vtkPolyDataCollection *New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
44  void AddItem(vtkPolyData *pd)
45  {
46  this->vtkCollection::AddItem(pd);
47  }
48 
53  return static_cast<vtkPolyData *>(this->GetNextItemAsObject());};
54 
60  return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));};
61 
62 protected:
64  ~vtkPolyDataCollection() VTK_OVERRIDE {}
65 
66 private:
67  // hide the standard AddItem from the user and the compiler.
68  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
69 
70 private:
71  vtkPolyDataCollection(const vtkPolyDataCollection&) VTK_DELETE_FUNCTION;
72  void operator=(const vtkPolyDataCollection&) VTK_DELETE_FUNCTION;
73 };
74 
75 
76 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkPolyData * GetNextItem()
Get the next poly data in the list.
vtkPolyData * GetNextPolyData(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCollection * New()
Construct with empty list.
void AddItem(vtkObject *)
Add an object to the list.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
void AddItem(vtkPolyData *pd)
Add a poly data to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
maintain a list of polygonal data objects