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 =========================================================================*/
22 #ifndef vtkDataSetCollection_h
23 #define vtkDataSetCollection_h
24 
25 #include "vtkCommonDataModelModule.h" // For export macro
26 #include "vtkCollection.h"
27 
28 #include "vtkDataSet.h" // Needed for inline methods.
29 
31 {
32 public:
33  static vtkDataSetCollection *New();
35 
37 
38  void AddItem(vtkDataSet *ds)
39  {
40  this->vtkCollection::AddItem(ds);
41  }
43 
45 
47  return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
49  return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
51 
53 
54  vtkDataSet *GetItem(int i) {
55  return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
57  return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
59 
60  //BTX
62 
65  return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));};
66  //ETX
68 
69 protected:
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  vtkDataSetCollection(const vtkDataSetCollection&); // Not implemented.
79  void operator=(const vtkDataSetCollection&); // Not implemented.
80 };
81 
82 
83 #endif
84 // VTK-HeaderTest-Exclude: vtkDataSetCollection.h
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
maintain an unordered list of dataset objects
abstract base class for most VTK objects
Definition: vtkObject.h:61
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
vtkDataSet * GetDataSet(int i)
vtkDataSet * GetNextDataSet()
vtkDataSet * GetItem(int i)
static vtkCollection * New()
vtkDataSet * GetNextDataSet(vtkCollectionSimpleIterator &cookie)
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkObject * GetNextItemAsObject()
vtkObject * GetItemAsObject(int i)
void AddItem(vtkDataSet *ds)
#define VTKCOMMONDATAMODEL_EXPORT