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

Common/vtkDataArrayCollection.h

Go to the documentation of this file.
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 =========================================================================*/
00037 #ifndef __vtkDataArrayCollection_h
00038 #define __vtkDataArrayCollection_h
00039 
00040 #include "vtkCollection.h"
00041 
00042 #include "vtkDataArray.h" // Needed for inline methods
00043 
00044 class VTK_COMMON_EXPORT vtkDataArrayCollection : public vtkCollection
00045 {
00046 public:
00047   static vtkDataArrayCollection *New();
00048   vtkTypeRevisionMacro(vtkDataArrayCollection,vtkCollection);
00049 
00051 
00052   void AddItem(vtkDataArray *ds) {
00053     this->vtkCollection::AddItem((vtkObject *)ds);};
00055   
00057 
00058   vtkDataArray *GetNextItem() { 
00059     return static_cast<vtkDataArray *>(this->GetNextItemAsObject());};
00061 
00063 
00064   vtkDataArray *GetItem(int i) { 
00065     return static_cast<vtkDataArray *>(this->GetItemAsObject(i));};
00067   
00068 protected:
00069   vtkDataArrayCollection() {};
00070   ~vtkDataArrayCollection() {};
00071 
00072 
00073 private:
00074   // hide the standard AddItem from the user and the compiler.
00075   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00076 
00077 private:
00078   vtkDataArrayCollection(const vtkDataArrayCollection&);  // Not implemented.
00079   void operator=(const vtkDataArrayCollection&);  // Not implemented.
00080 };
00081 
00082 
00083 #endif