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

vtkIdListCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIdListCollection.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 __vtkIdListCollection_h
00035 #define __vtkIdListCollection_h
00036 
00037 #include "vtkCollection.h"
00038 
00039 #include "vtkIdList.h" // Needed for inline methods
00040 
00041 class VTK_COMMON_EXPORT vtkIdListCollection : public vtkCollection
00042 {
00043 public:
00044   static vtkIdListCollection *New();
00045   vtkTypeRevisionMacro(vtkIdListCollection,vtkCollection);
00046 
00048 
00049   void AddItem(vtkIdList *ds) {
00050     this->vtkCollection::AddItem((vtkObject *)ds);};
00052   
00054 
00055   vtkIdList *GetNextItem() { 
00056     return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
00058 
00060 
00061   vtkIdList *GetItem(int i) { 
00062     return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
00064 
00065   //BTX
00067 
00069   vtkIdList *GetNextIdList(vtkCollectionSimpleIterator &cookie) {
00070     return static_cast<vtkIdList *>(this->GetNextItemAsObject(cookie));};
00071   //ETX
00073   
00074 protected:
00075   vtkIdListCollection() {};
00076   ~vtkIdListCollection() {};
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   vtkIdListCollection(const vtkIdListCollection&);  // Not implemented.
00085   void operator=(const vtkIdListCollection&);  // Not implemented.
00086 };
00087 
00088 
00089 #endif