1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkIdListCollection.h,v $
6 Date: $Date: 2002/12/26 18:24:21 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkIdListCollection - maintain an unordered list of dataarray objects
19 // .SECTION Description
20 // vtkIdListCollection is an object that creates and manipulates lists of
21 // datasets. See also vtkCollection and subclasses.
23 #ifndef __vtkIdListCollection_h
24 #define __vtkIdListCollection_h
26 #include "vtkCollection.h"
28 #include "vtkIdList.h" // Needed for inline methods
30 class VTK_COMMON_EXPORT vtkIdListCollection : public vtkCollection
33 static vtkIdListCollection *New();
34 vtkTypeRevisionMacro(vtkIdListCollection,vtkCollection);
37 // Add a dataset to the list.
38 void AddItem(vtkIdList *ds) {
39 this->vtkCollection::AddItem((vtkObject *)ds);};
42 // Get the next dataset in the list.
43 vtkIdList *GetNextItem() {
44 return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
47 // Get the ith dataset in the list.
48 vtkIdList *GetItem(int i) {
49 return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
52 vtkIdListCollection() {};
53 ~vtkIdListCollection() {};
57 // hide the standard AddItem from the user and the compiler.
58 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
61 vtkIdListCollection(const vtkIdListCollection&); // Not implemented.
62 void operator=(const vtkIdListCollection&); // Not implemented.