Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Common/vtkDataSetCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataSetCollection.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00039 #ifndef __vtkDataSetCollection_h
00040 #define __vtkDataSetCollection_h
00041 
00042 #include "vtkCollection.h"
00043 
00044 #include "vtkDataSet.h" // Needed for inline methods.
00045 
00046 class VTK_COMMON_EXPORT vtkDataSetCollection : public vtkCollection
00047 {
00048 public:
00049   static vtkDataSetCollection *New();
00050   vtkTypeRevisionMacro(vtkDataSetCollection,vtkCollection);
00051 
00053 
00054   void AddItem(vtkDataSet *ds) {
00055     this->vtkCollection::AddItem((vtkObject *)ds);};
00057   
00059 
00060   vtkDataSet *GetNextItem() { 
00061     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00063 
00065 
00066   vtkDataSet *GetItem(int i) { 
00067     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00069   
00070 protected:
00071   vtkDataSetCollection() {};
00072   ~vtkDataSetCollection() {};
00073 
00074 
00075 private:
00076   // hide the standard AddItem from the user and the compiler.
00077   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00078 
00079 private:
00080   vtkDataSetCollection(const vtkDataSetCollection&);  // Not implemented.
00081   void operator=(const vtkDataSetCollection&);  // Not implemented.
00082 };
00083 
00084 
00085 #endif