00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyDataCollection.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00039 #ifndef __vtkPolyDataCollection_h 00040 #define __vtkPolyDataCollection_h 00041 00042 #include "vtkCollection.h" 00043 00044 #include "vtkPolyData.h" // Needed for static cast 00045 00046 class VTK_FILTERING_EXPORT vtkPolyDataCollection : public vtkCollection 00047 { 00048 public: 00049 static vtkPolyDataCollection *New(); 00050 vtkTypeRevisionMacro(vtkPolyDataCollection,vtkCollection); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 void AddItem(vtkPolyData *pd) { 00056 this->vtkCollection::AddItem((vtkObject *)pd);}; 00058 00060 00061 vtkPolyData *GetNextItem() { 00062 return static_cast<vtkPolyData *>(this->GetNextItemAsObject());}; 00064 00065 //BTX 00067 00069 vtkPolyData *GetNextPolyData(vtkCollectionSimpleIterator &cookie) { 00070 return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));}; 00071 //ETX 00073 00074 protected: 00075 vtkPolyDataCollection() {}; 00076 ~vtkPolyDataCollection() {}; 00077 00078 private: 00079 // hide the standard AddItem from the user and the compiler. 00080 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00081 00082 private: 00083 vtkPolyDataCollection(const vtkPolyDataCollection&); // Not implemented. 00084 void operator=(const vtkPolyDataCollection&); // Not implemented. 00085 }; 00086 00087 00088 #endif