00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataSetCollection.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00026 #ifndef __vtkDataSetCollection_h 00027 #define __vtkDataSetCollection_h 00028 00029 #include "vtkCollection.h" 00030 00031 #include "vtkDataSet.h" // Needed for inline methods. 00032 00033 class VTK_COMMON_EXPORT vtkDataSetCollection : public vtkCollection 00034 { 00035 public: 00036 static vtkDataSetCollection *New(); 00037 vtkTypeRevisionMacro(vtkDataSetCollection,vtkCollection); 00038 00040 00041 void AddItem(vtkDataSet *ds) { 00042 this->vtkCollection::AddItem((vtkObject *)ds);}; 00044 00046 00047 vtkDataSet *GetNextItem() { 00048 return static_cast<vtkDataSet *>(this->GetNextItemAsObject());}; 00050 00052 00053 vtkDataSet *GetItem(int i) { 00054 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));}; 00056 00057 protected: 00058 vtkDataSetCollection() {}; 00059 ~vtkDataSetCollection() {}; 00060 00061 00062 private: 00063 // hide the standard AddItem from the user and the compiler. 00064 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00065 00066 private: 00067 vtkDataSetCollection(const vtkDataSetCollection&); // Not implemented. 00068 void operator=(const vtkDataSetCollection&); // Not implemented. 00069 }; 00070 00071 00072 #endif