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_COMMON_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());}; 00046 00048 00049 vtkDataSet *GetItem(int i) { 00050 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));}; 00052 00053 protected: 00054 vtkDataSetCollection() {}; 00055 ~vtkDataSetCollection() {}; 00056 00057 00058 private: 00059 // hide the standard AddItem from the user and the compiler. 00060 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00061 00062 private: 00063 vtkDataSetCollection(const vtkDataSetCollection&); // Not implemented. 00064 void operator=(const vtkDataSetCollection&); // Not implemented. 00065 }; 00066 00067 00068 #endif