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 "vtkCollection.h"
26 
27 #include "vtkDataSet.h" // Needed for inline methods.
28 
30 {
31 public:
32  static vtkDataSetCollection *New();
34 
36 
37  void AddItem(vtkDataSet *ds)
38  {
39  this->vtkCollection::AddItem(ds);
40  }
42 
44 
46  return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
48  return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
50 
52 
53  vtkDataSet *GetItem(int i) {
54  return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
56  return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
58 
59  //BTX
61 
64  return static_cast<vtkDataSet *>(this->GetNextItemAsObject(cookie));};
65  //ETX
67 
68 protected:
71 
72 private:
73  // hide the standard AddItem from the user and the compiler.
74  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
75 
76 private:
77  vtkDataSetCollection(const vtkDataSetCollection&); // Not implemented.
78  void operator=(const vtkDataSetCollection&); // Not implemented.
79 };
80 
81 
82 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
maintain an unordered list of dataset objects
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
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:51
vtkObject * GetNextItemAsObject()
vtkObject * GetItemAsObject(int i)
void AddItem(vtkDataSet *ds)