VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
25 #ifndef __vtkPolyDataCollection_h
26 #define __vtkPolyDataCollection_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
29 #include "vtkCollection.h"
30 
31 #include "vtkPolyData.h" // Needed for static cast
32 
33 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection
34 {
35 public:
36  static vtkPolyDataCollection *New();
37  vtkTypeMacro(vtkPolyDataCollection,vtkCollection);
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
42  void AddItem(vtkPolyData *pd)
43  {
44  this->vtkCollection::AddItem(pd);
45  }
47 
49 
51  return static_cast<vtkPolyData *>(this->GetNextItemAsObject());};
53 
54  //BTX
56 
58  vtkPolyData *GetNextPolyData(vtkCollectionSimpleIterator &cookie) {
59  return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));};
60  //ETX
62 
63 protected:
66 
67 private:
68  // hide the standard AddItem from the user and the compiler.
69  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
70 
71 private:
72  vtkPolyDataCollection(const vtkPolyDataCollection&); // Not implemented.
73  void operator=(const vtkPolyDataCollection&); // Not implemented.
74 };
75 
76 
77 #endif
vtkPolyData * GetNextPolyData(vtkCollectionSimpleIterator &cookie)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:82
void AddItem(vtkPolyData *pd)
maintain a list of polygonal data objects