VTK
dox/Common/DataModel/vtkDataSetCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDataSetCollection.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 =========================================================================*/
00022 #ifndef __vtkDataSetCollection_h
00023 #define __vtkDataSetCollection_h
00024 
00025 #include "vtkCommonDataModelModule.h" // For export macro
00026 #include "vtkCollection.h"
00027 
00028 #include "vtkDataSet.h" // Needed for inline methods.
00029 
00030 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetCollection : public vtkCollection
00031 {
00032 public:
00033   static vtkDataSetCollection *New();
00034   vtkTypeMacro(vtkDataSetCollection,vtkCollection);
00035 
00037 
00038   void AddItem(vtkDataSet *ds)
00039     {
00040       this->vtkCollection::AddItem(ds);
00041     }
00043 
00045 
00046   vtkDataSet *GetNextItem() {
00047     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00048   vtkDataSet *GetNextDataSet() {
00049     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00051 
00053 
00054   vtkDataSet *GetItem(int i) {
00055     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00056   vtkDataSet *GetDataSet(int i) {
00057     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00059 
00060   //BTX
00062 
00064   vtkDataSet *GetNextDataSet(vtkCollectionSimpleIterator &cookie) {
00065     return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));};
00066   //ETX
00068 
00069 protected:
00070   vtkDataSetCollection() {}
00071   ~vtkDataSetCollection() {}
00072 
00073 private:
00074   // hide the standard AddItem from the user and the compiler.
00075   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00076 
00077 private:
00078   vtkDataSetCollection(const vtkDataSetCollection&);  // Not implemented.
00079   void operator=(const vtkDataSetCollection&);  // Not implemented.
00080 };
00081 
00082 
00083 #endif
00084 // VTK-HeaderTest-Exclude: vtkDataSetCollection.h