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 
31 class VTKCOMMONDATAMODEL_EXPORT vtkDataSetCollection : public vtkCollection
32 {
33 public:
34  static vtkDataSetCollection *New();
36 
40  void AddItem(vtkDataSet *ds)
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 
59  vtkDataSet *GetItem(int i) {
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 
72 protected:
74  ~vtkDataSetCollection() VTK_OVERRIDE {}
75 
76 private:
77  // hide the standard AddItem from the user and the compiler.
78  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
79 
80 private:
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
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkDataSet * GetNextItem()
Get the next dataset in the list.
maintain an unordered list of dataset objects
abstract base class for most VTK objects
Definition: vtkObject.h:59
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkDataSet * GetDataSet(int i)
Get the ith dataset in the list.
vtkDataSet * GetNextDataSet()
Get the next dataset in the list.
vtkDataSet * GetItem(int i)
Get the ith dataset in the list.
static vtkCollection * New()
Construct with empty list.
vtkDataSet * GetNextDataSet(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkObject *)
Add an object to the list.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
vtkObject * GetItemAsObject(int i)
Get the i'th item in the collection.
void AddItem(vtkDataSet *ds)
Add a dataset to the list.