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

vtkDataArrayCollection.h

Go to the documentation of this file.
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 =========================================================================*/
00034 #ifndef __vtkDataArrayCollection_h
00035 #define __vtkDataArrayCollection_h
00036 
00037 #include "vtkCollection.h"
00038 
00039 #include "vtkDataArray.h" // Needed for inline methods
00040 
00041 class VTK_COMMON_EXPORT vtkDataArrayCollection : public vtkCollection
00042 {
00043 public:
00044   static vtkDataArrayCollection *New();
00045   vtkTypeRevisionMacro(vtkDataArrayCollection,vtkCollection);
00046 
00048 
00049   void AddItem(vtkDataArray *ds) {
00050     this->vtkCollection::AddItem((vtkObject *)ds);};
00052   
00054 
00055   vtkDataArray *GetNextItem() { 
00056     return static_cast<vtkDataArray *>(this->GetNextItemAsObject());};
00058 
00060 
00061   vtkDataArray *GetItem(int i) { 
00062     return static_cast<vtkDataArray *>(this->GetItemAsObject(i));};
00064   
00065   //BTX
00067 
00069   vtkDataArray *GetNextDataArray(vtkCollectionSimpleIterator &cookie) {
00070     return static_cast<vtkDataArray *>(this->GetNextItemAsObject(cookie));};
00071   //ETX
00073 
00074 protected:
00075   vtkDataArrayCollection() {};
00076   ~vtkDataArrayCollection() {};
00077 
00078 
00079 private:
00080   // hide the standard AddItem from the user and the compiler.
00081   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00082 
00083 private:
00084   vtkDataArrayCollection(const vtkDataArrayCollection&);  // Not implemented.
00085   void operator=(const vtkDataArrayCollection&);  // Not implemented.
00086 };
00087 
00088 
00089 #endif