00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkIdListCollection.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 __vtkIdListCollection_h 00023 #define __vtkIdListCollection_h 00024 00025 #include "vtkCollection.h" 00026 00027 #include "vtkIdList.h" // Needed for inline methods 00028 00029 class VTK_COMMON_EXPORT vtkIdListCollection : public vtkCollection 00030 { 00031 public: 00032 static vtkIdListCollection *New(); 00033 vtkTypeMacro(vtkIdListCollection,vtkCollection); 00034 00036 00037 void AddItem(vtkIdList *ds) 00038 { 00039 this->vtkCollection::AddItem(ds); 00040 } 00042 00044 00045 vtkIdList *GetNextItem() { 00046 return static_cast<vtkIdList *>(this->GetNextItemAsObject());}; 00048 00050 00051 vtkIdList *GetItem(int i) { 00052 return static_cast<vtkIdList *>(this->GetItemAsObject(i));}; 00054 00055 //BTX 00057 00059 vtkIdList *GetNextIdList(vtkCollectionSimpleIterator &cookie) { 00060 return static_cast<vtkIdList *>(this->GetNextItemAsObject(cookie));}; 00061 //ETX 00063 00064 protected: 00065 vtkIdListCollection() {}; 00066 ~vtkIdListCollection() {}; 00067 00068 00069 private: 00070 // hide the standard AddItem from the user and the compiler. 00071 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00072 00073 private: 00074 vtkIdListCollection(const vtkIdListCollection&); // Not implemented. 00075 void operator=(const vtkIdListCollection&); // Not implemented. 00076 }; 00077 00078 00079 #endif