00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataSetCollection.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 =========================================================================*/ 00022 #ifndef __vtkDataSetCollection_h 00023 #define __vtkDataSetCollection_h 00024 00025 #include "vtkCollection.h" 00026 00027 #include "vtkDataSet.h" // Needed for inline methods. 00028 00029 class VTK_FILTERING_EXPORT vtkDataSetCollection : public vtkCollection 00030 { 00031 public: 00032 static vtkDataSetCollection *New(); 00033 vtkTypeRevisionMacro(vtkDataSetCollection,vtkCollection); 00034 00036 00037 void AddItem(vtkDataSet *ds) { 00038 this->vtkCollection::AddItem((vtkObject *)ds);}; 00040 00042 00043 vtkDataSet *GetNextItem() { 00044 return static_cast<vtkDataSet *>(this->GetNextItemAsObject());}; 00045 vtkDataSet *GetNextDataSet() { 00046 return static_cast<vtkDataSet *>(this->GetNextItemAsObject());}; 00048 00050 00051 vtkDataSet *GetItem(int i) { 00052 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));}; 00053 vtkDataSet *GetDataSet(int i) { 00054 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));}; 00056 00057 //BTX 00059 00061 vtkDataSet *GetNextDataSet(vtkCollectionSimpleIterator &cookie) { 00062 return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));}; 00063 //ETX 00065 00066 protected: 00067 vtkDataSetCollection() {}; 00068 ~vtkDataSetCollection() {}; 00069 00070 private: 00071 // hide the standard AddItem from the user and the compiler. 00072 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00073 00074 private: 00075 vtkDataSetCollection(const vtkDataSetCollection&); // Not implemented. 00076 void operator=(const vtkDataSetCollection&); // Not implemented. 00077 }; 00078 00079 00080 #endif