VTK
dox/Filtering/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 "vtkCollection.h"
00026 
00027 #include "vtkDataSet.h" // Needed for inline methods.
00028 
00029 class VTK_FILTERING_EXPORT vtkDataSetCollection : public vtkCollection
00030 {
00031 public:
00032   static vtkDataSetCollection *New();
00033   vtkTypeMacro(vtkDataSetCollection,vtkCollection);
00034 
00036 
00037   void AddItem(vtkDataSet *ds)
00038     {
00039       this->vtkCollection::AddItem(ds);
00040     }
00042   
00044 
00045   vtkDataSet *GetNextItem() { 
00046     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00047   vtkDataSet *GetNextDataSet() { 
00048     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00050 
00052 
00053   vtkDataSet *GetItem(int i) { 
00054     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00055   vtkDataSet *GetDataSet(int i) { 
00056     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00058   
00059   //BTX
00061 
00063   vtkDataSet *GetNextDataSet(vtkCollectionSimpleIterator &cookie) {
00064     return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));};
00065   //ETX
00067 
00068 protected:
00069   vtkDataSetCollection() {};
00070   ~vtkDataSetCollection() {};
00071 
00072 private:
00073   // hide the standard AddItem from the user and the compiler.
00074   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00075 
00076 private:
00077   vtkDataSetCollection(const vtkDataSetCollection&);  // Not implemented.
00078   void operator=(const vtkDataSetCollection&);  // Not implemented.
00079 };
00080 
00081 
00082 #endif