VTK
dox/Common/DataModel/vtkDataObjectCollection.h
Go to the documentation of this file.
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 =========================================================================*/
00025 #ifndef __vtkDataObjectCollection_h
00026 #define __vtkDataObjectCollection_h
00027 
00028 #include "vtkCommonDataModelModule.h" // For export macro
00029 #include "vtkCollection.h"
00030 
00031 #include "vtkDataObject.h" // Needed for inline methods
00032 
00033 class VTKCOMMONDATAMODEL_EXPORT vtkDataObjectCollection : public vtkCollection
00034 {
00035 public:
00036   static vtkDataObjectCollection *New();
00037   vtkTypeMacro(vtkDataObjectCollection,vtkCollection);
00038 
00040 
00041   void AddItem(vtkDataObject *ds)
00042     {
00043       this->vtkCollection::AddItem(ds);
00044     }
00046 
00048 
00049   vtkDataObject *GetNextItem()
00050     {
00051       return static_cast<vtkDataObject *>(this->GetNextItemAsObject());
00052     }
00054 
00056 
00057   vtkDataObject *GetItem(int i)
00058     {
00059       return static_cast<vtkDataObject *>(this->GetItemAsObject(i));
00060     }
00062 
00063   //BTX
00065 
00067   vtkDataObject *GetNextDataObject(vtkCollectionSimpleIterator &cookie)
00068     {
00069       return static_cast<vtkDataObject *>(this->GetNextItemAsObject(cookie));
00070     }
00071   //ETX
00073 
00074 protected:
00075   vtkDataObjectCollection() {}
00076   ~vtkDataObjectCollection() {}
00077 
00078 
00079 private:
00080   // hide the standard AddItem from the user and the compiler.
00081   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00082 
00083 private:
00084   vtkDataObjectCollection(const vtkDataObjectCollection&);  // Not implemented.
00085   void operator=(const vtkDataObjectCollection&);  // Not implemented.
00086 };
00087 
00088 
00089 #endif
00090 // VTK-HeaderTest-Exclude: vtkDataObjectCollection.h