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