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 =========================================================================*/
25 #ifndef vtkIdListCollection_h
26 #define vtkIdListCollection_h
27 
28 #include "vtkCommonCoreModule.h" // For export macro
29 #include "vtkCollection.h"
30 
31 #include "vtkIdList.h" // Needed for inline methods
32 
34 {
35 public:
36  static vtkIdListCollection *New();
38 
40 
41  void AddItem(vtkIdList *ds)
42  {
43  this->vtkCollection::AddItem(ds);
44  }
46 
48 
50  return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
52 
54 
55  vtkIdList *GetItem(int i) {
56  return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
58 
59  //BTX
61 
64  return static_cast<vtkIdList *>(this->GetNextItemAsObject(cookie));};
65  //ETX
67 
68 protected:
71 
72 
73 private:
74  // hide the standard AddItem from the user and the compiler.
75  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
76 
77 private:
78  vtkIdListCollection(const vtkIdListCollection&); // Not implemented.
79  void operator=(const vtkIdListCollection&); // Not implemented.
80 };
81 
82 
83 #endif
84 // 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)