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 =========================================================================*/ 00025 #ifndef __vtkDataObjectCollection_h 00026 #define __vtkDataObjectCollection_h 00027 00028 #include "vtkCollection.h" 00029 00030 #include "vtkDataObject.h" // Needed for inline methods 00031 00032 class VTK_FILTERING_EXPORT vtkDataObjectCollection : public vtkCollection 00033 { 00034 public: 00035 static vtkDataObjectCollection *New(); 00036 vtkTypeRevisionMacro(vtkDataObjectCollection,vtkCollection); 00037 00039 00040 void AddItem(vtkDataObject *ds) 00041 { 00042 this->vtkCollection::AddItem(ds); 00043 } 00045 00047 00048 vtkDataObject *GetNextItem() 00049 { 00050 return static_cast<vtkDataObject *>(this->GetNextItemAsObject()); 00051 } 00053 00055 00056 vtkDataObject *GetItem(int i) 00057 { 00058 return static_cast<vtkDataObject *>(this->GetItemAsObject(i)); 00059 } 00061 00062 //BTX 00064 00066 vtkDataObject *GetNextDataObject(vtkCollectionSimpleIterator &cookie) 00067 { 00068 return static_cast<vtkDataObject *>(this->GetNextItemAsObject(cookie)); 00069 } 00070 //ETX 00072 00073 protected: 00074 vtkDataObjectCollection() {}; 00075 ~vtkDataObjectCollection() {}; 00076 00077 00078 private: 00079 // hide the standard AddItem from the user and the compiler. 00080 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00081 00082 private: 00083 vtkDataObjectCollection(const vtkDataObjectCollection&); // Not implemented. 00084 void operator=(const vtkDataObjectCollection&); // Not implemented. 00085 }; 00086 00087 00088 #endif