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