00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDataArrayCollection.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 __vtkDataArrayCollection_h 00027 #define __vtkDataArrayCollection_h 00028 00029 #include "vtkCollection.h" 00030 00031 #include "vtkDataArray.h" // Needed for inline methods 00032 00033 class VTK_COMMON_EXPORT vtkDataArrayCollection : public vtkCollection 00034 { 00035 public: 00036 static vtkDataArrayCollection *New(); 00037 vtkTypeRevisionMacro(vtkDataArrayCollection,vtkCollection); 00038 00040 00041 void AddItem(vtkDataArray *ds) { 00042 this->vtkCollection::AddItem((vtkObject *)ds);}; 00044 00046 00047 vtkDataArray *GetNextItem() { 00048 return static_cast<vtkDataArray *>(this->GetNextItemAsObject());}; 00050 00052 00053 vtkDataArray *GetItem(int i) { 00054 return static_cast<vtkDataArray *>(this->GetItemAsObject(i));}; 00056 00057 protected: 00058 vtkDataArrayCollection() {}; 00059 ~vtkDataArrayCollection() {}; 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 vtkDataArrayCollection(const vtkDataArrayCollection&); // Not implemented. 00068 void operator=(const vtkDataArrayCollection&); // Not implemented. 00069 }; 00070 00071 00072 #endif