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=========================================================================*/
26#ifndef vtkIdListCollection_h
27#define vtkIdListCollection_h
28
29#include "vtkCommonCoreModule.h" // For export macro
30#include "vtkCollection.h"
31
32#include "vtkIdList.h" // Needed for inline methods
33
34class VTKCOMMONCORE_EXPORT vtkIdListCollection : public vtkCollection
35{
36public:
39
44 {
45 this->vtkCollection::AddItem(ds);
46 }
47
52 return static_cast<vtkIdList *>(this->GetNextItemAsObject());};
53
58 return static_cast<vtkIdList *>(this->GetItemAsObject(i));};
59
65 return static_cast<vtkIdList *>(this->GetNextItemAsObject(cookie));};
66
67protected:
69 ~vtkIdListCollection() VTK_OVERRIDE {}
70
71
72private:
73 // hide the standard AddItem from the user and the compiler.
74 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
75
76private:
77 vtkIdListCollection(const vtkIdListCollection&) VTK_DELETE_FUNCTION;
78 void operator=(const vtkIdListCollection&) VTK_DELETE_FUNCTION;
79};
80
81
82#endif
83// VTK-HeaderTest-Exclude: vtkIdListCollection.h
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkObject * GetItemAsObject(int i)
Get the i'th item in the collection.
void AddItem(vtkObject *)
Add an object to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
maintain an unordered list of dataarray objects
vtkIdList * GetItem(int i)
Get the ith dataset in the list.
vtkIdList * GetNextItem()
Get the next dataset in the list.
vtkIdList * GetNextIdList(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
static vtkIdListCollection * New()
void AddItem(vtkIdList *ds)
Add a dataset to the list.
list of point or cell ids
Definition: vtkIdList.h:37
abstract base class for most VTK objects
Definition: vtkObject.h:60
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47