VTK
dox/Common/Core/vtkDataArrayCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDataArrayCollection.h
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 "vtkCommonCoreModule.h" // For export macro
00026 #include "vtkCollection.h"
00027 
00028 #include "vtkDataArray.h" // Needed for inline methods
00029 
00030 class VTKCOMMONCORE_EXPORT vtkDataArrayCollection : public vtkCollection
00031 {
00032 public:
00033   static vtkDataArrayCollection *New();
00034   vtkTypeMacro(vtkDataArrayCollection,vtkCollection);
00035 
00037 
00038   void AddItem(vtkDataArray *ds)
00039     {
00040       this->vtkCollection::AddItem(ds);
00041     }
00043 
00045 
00046   vtkDataArray *GetNextItem() {
00047     return static_cast<vtkDataArray *>(this->GetNextItemAsObject());};
00049 
00051 
00052   vtkDataArray *GetItem(int i) {
00053     return static_cast<vtkDataArray *>(this->GetItemAsObject(i));};
00055 
00056   //BTX
00058 
00060   vtkDataArray *GetNextDataArray(vtkCollectionSimpleIterator &cookie) {
00061     return static_cast<vtkDataArray *>(this->GetNextItemAsObject(cookie));};
00062   //ETX
00064 
00065 protected:
00066   vtkDataArrayCollection() {}
00067   ~vtkDataArrayCollection() {}
00068 
00069 
00070 private:
00071   // hide the standard AddItem from the user and the compiler.
00072   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00073 
00074 private:
00075   vtkDataArrayCollection(const vtkDataArrayCollection&);  // Not implemented.
00076   void operator=(const vtkDataArrayCollection&);  // Not implemented.
00077 };
00078 
00079 
00080 #endif
00081 // VTK-HeaderTest-Exclude: vtkDataArrayCollection.h