VTK
dox/Filtering/vtkPolyDataCollection.h
Go to the documentation of this file.
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 "vtkCollection.h"
00029 
00030 #include "vtkPolyData.h" // Needed for static cast
00031 
00032 class VTK_FILTERING_EXPORT vtkPolyDataCollection : public vtkCollection
00033 {
00034 public:
00035   static vtkPolyDataCollection *New();
00036   vtkTypeMacro(vtkPolyDataCollection,vtkCollection);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040 
00041   void AddItem(vtkPolyData *pd)
00042     {
00043       this->vtkCollection::AddItem(pd);
00044     }
00046 
00048 
00049   vtkPolyData *GetNextItem() { 
00050     return static_cast<vtkPolyData *>(this->GetNextItemAsObject());};
00052 
00053   //BTX
00055 
00057   vtkPolyData *GetNextPolyData(vtkCollectionSimpleIterator &cookie) {
00058     return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));};
00059   //ETX
00061 
00062 protected:  
00063   vtkPolyDataCollection() {};
00064   ~vtkPolyDataCollection() {};
00065 
00066 private:
00067   // hide the standard AddItem from the user and the compiler.
00068   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00069 
00070 private:
00071   vtkPolyDataCollection(const vtkPolyDataCollection&);  // Not implemented.
00072   void operator=(const vtkPolyDataCollection&);  // Not implemented.
00073 };
00074 
00075 
00076 #endif