VTK
vtkDataSetCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDataSetCollection.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=========================================================================*/
23#ifndef vtkDataSetCollection_h
24#define vtkDataSetCollection_h
25
26#include "vtkCommonDataModelModule.h" // For export macro
27#include "vtkCollection.h"
28
29#include "vtkDataSet.h" // Needed for inline methods.
30
31class VTKCOMMONDATAMODEL_EXPORT vtkDataSetCollection : public vtkCollection
32{
33public:
36
41 {
42 this->vtkCollection::AddItem(ds);
43 }
44
46
50 return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
52 return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
54
56
60 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
62 return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
64
70 return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));};
71
72protected:
74 ~vtkDataSetCollection() VTK_OVERRIDE {}
75
76private:
77 // hide the standard AddItem from the user and the compiler.
78 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
79
80private:
81 vtkDataSetCollection(const vtkDataSetCollection&) VTK_DELETE_FUNCTION;
82 void operator=(const vtkDataSetCollection&) VTK_DELETE_FUNCTION;
83};
84
85
86#endif
87// VTK-HeaderTest-Exclude: vtkDataSetCollection.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 dataset objects
void AddItem(vtkDataSet *ds)
Add a dataset to the list.
vtkDataSet * GetNextDataSet(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkDataSet * GetNextDataSet()
vtkDataSet * GetDataSet(int i)
vtkDataSet * GetItem(int i)
Get the ith dataset in the list.
static vtkDataSetCollection * New()
vtkDataSet * GetNextItem()
Get the next dataset in the list.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
abstract base class for most VTK objects
Definition: vtkObject.h:60
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47