VTK
vtkIdListCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIdListCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkIdListCollection_h
23 #define vtkIdListCollection_h
24 
25 #include "vtkCommonCoreModule.h" // For export macro
26 #include "vtkCollection.h"
27 
28 #include "vtkIdList.h" // Needed for inline methods
29 
31 {
32 public:
33  static vtkIdListCollection *New();
35 
37 
38  void AddItem(vtkIdList *ds)
39  {
40  this->vtkCollection::AddItem(ds);
41  }
43 
45 
47  return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
49 
51 
52  vtkIdList *GetItem(int i) {
53  return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
55 
56  //BTX
58 
61  return static_cast<vtkIdList *>(this->GetNextItemAsObject(cookie));};
62  //ETX
64 
65 protected:
68 
69 
70 private:
71  // hide the standard AddItem from the user and the compiler.
72  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
73 
74 private:
75  vtkIdListCollection(const vtkIdListCollection&); // Not implemented.
76  void operator=(const vtkIdListCollection&); // Not implemented.
77 };
78 
79 
80 #endif
81 // VTK-HeaderTest-Exclude: vtkIdListCollection.h
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKCOMMONCORE_EXPORT
void AddItem(vtkIdList *ds)
vtkIdList * GetItem(int i)
vtkIdList * GetNextIdList(vtkCollectionSimpleIterator &cookie)
list of point or cell ids
Definition: vtkIdList.h:35
static vtkCollection * New()
void AddItem(vtkObject *)
maintain an unordered list of dataarray objects
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkObject * GetNextItemAsObject()
vtkObject * GetItemAsObject(int i)