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

dox/Common/vtkDataObjectCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataObjectCollection.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 =========================================================================*/
00026 #ifndef __vtkDataObjectCollection_h
00027 #define __vtkDataObjectCollection_h
00028 
00029 #include "vtkCollection.h"
00030 
00031 #include "vtkDataObject.h" // Needed for inline methods
00032 
00033 class VTK_COMMON_EXPORT vtkDataObjectCollection : public vtkCollection
00034 {
00035 public:
00036   static vtkDataObjectCollection *New();
00037   vtkTypeRevisionMacro(vtkDataObjectCollection,vtkCollection);
00038 
00040 
00041   void AddItem(vtkDataObject *ds) {
00042     this->vtkCollection::AddItem((vtkObject *)ds);};
00044   
00046 
00047   vtkDataObject *GetNextItem() { 
00048     return static_cast<vtkDataObject *>(this->GetNextItemAsObject());};
00050 
00052 
00053   vtkDataObject *GetItem(int i) { 
00054     return static_cast<vtkDataObject *>(this->GetItemAsObject(i));};
00056   
00057 protected:
00058   vtkDataObjectCollection() {};
00059   ~vtkDataObjectCollection() {};
00060 
00061 
00062 private:
00063   // hide the standard AddItem from the user and the compiler.
00064   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00065 
00066 private:
00067   vtkDataObjectCollection(const vtkDataObjectCollection&);  // Not implemented.
00068   void operator=(const vtkDataObjectCollection&);  // Not implemented.
00069 };
00070 
00071 
00072 #endif