VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPolyDataCollection.h 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 =========================================================================*/ 00025 #ifndef __vtkPolyDataCollection_h 00026 #define __vtkPolyDataCollection_h 00027 00028 #include "vtkCommonDataModelModule.h" // For export macro 00029 #include "vtkCollection.h" 00030 00031 #include "vtkPolyData.h" // Needed for static cast 00032 00033 class VTKCOMMONDATAMODEL_EXPORT vtkPolyDataCollection : public vtkCollection 00034 { 00035 public: 00036 static vtkPolyDataCollection *New(); 00037 vtkTypeMacro(vtkPolyDataCollection,vtkCollection); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 00041 00042 void AddItem(vtkPolyData *pd) 00043 { 00044 this->vtkCollection::AddItem(pd); 00045 } 00047 00049 00050 vtkPolyData *GetNextItem() { 00051 return static_cast<vtkPolyData *>(this->GetNextItemAsObject());}; 00053 00054 //BTX 00056 00058 vtkPolyData *GetNextPolyData(vtkCollectionSimpleIterator &cookie) { 00059 return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));}; 00060 //ETX 00062 00063 protected: 00064 vtkPolyDataCollection() {} 00065 ~vtkPolyDataCollection() {} 00066 00067 private: 00068 // hide the standard AddItem from the user and the compiler. 00069 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00070 00071 private: 00072 vtkPolyDataCollection(const vtkPolyDataCollection&); // Not implemented. 00073 void operator=(const vtkPolyDataCollection&); // Not implemented. 00074 }; 00075 00076 00077 #endif