00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataObjectCollection.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 =========================================================================*/ 00032 #ifndef __vtkDataObjectCollection_h 00033 #define __vtkDataObjectCollection_h 00034 00035 #include "vtkCollection.h" 00036 00037 #include "vtkDataObject.h" // Needed for inline methods 00038 00039 class VTK_FILTERING_EXPORT vtkDataObjectCollection : public vtkCollection 00040 { 00041 public: 00042 static vtkDataObjectCollection *New(); 00043 vtkTypeRevisionMacro(vtkDataObjectCollection,vtkCollection); 00044 00046 00047 void AddItem(vtkDataObject *ds) { 00048 this->vtkCollection::AddItem((vtkObject *)ds);}; 00050 00052 00053 vtkDataObject *GetNextItem() { 00054 return static_cast<vtkDataObject *>(this->GetNextItemAsObject());}; 00056 00058 00059 vtkDataObject *GetItem(int i) { 00060 return static_cast<vtkDataObject *>(this->GetItemAsObject(i));}; 00062 00063 //BTX 00065 00067 vtkDataObject *GetNextDataObject(vtkCollectionSimpleIterator &cookie) { 00068 return static_cast<vtkDataObject *>(this->GetNextItemAsObject(cookie));}; 00069 //ETX 00071 00072 protected: 00073 vtkDataObjectCollection() {}; 00074 ~vtkDataObjectCollection() {}; 00075 00076 00077 private: 00078 // hide the standard AddItem from the user and the compiler. 00079 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00080 00081 private: 00082 vtkDataObjectCollection(const vtkDataObjectCollection&); // Not implemented. 00083 void operator=(const vtkDataObjectCollection&); // Not implemented. 00084 }; 00085 00086 00087 #endif