VTK
vtkDataObjectCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectCollection.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 =========================================================================*/
28 #ifndef __vtkDataObjectCollection_h
29 #define __vtkDataObjectCollection_h
30 
31 #include "vtkCollection.h"
32 
33 #include "vtkDataObject.h" // Needed for inline methods
34 
36 {
37 public:
38  static vtkDataObjectCollection *New();
40 
42 
44  {
45  this->vtkCollection::AddItem(ds);
46  }
48 
50 
52  {
53  return static_cast<vtkDataObject *>(this->GetNextItemAsObject());
54  }
56 
58 
60  {
61  return static_cast<vtkDataObject *>(this->GetItemAsObject(i));
62  }
64 
65  //BTX
67 
70  {
71  return static_cast<vtkDataObject *>(this->GetNextItemAsObject(cookie));
72  }
73  //ETX
75 
76 protected:
79 
80 
81 private:
82  // hide the standard AddItem from the user and the compiler.
83  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
84 
85 private:
86  vtkDataObjectCollection(const vtkDataObjectCollection&); // Not implemented.
87  void operator=(const vtkDataObjectCollection&); // Not implemented.
88 };
89 
90 
91 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
vtkDataObject * GetNextDataObject(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
vtkDataObject * GetItem(int i)
maintain an unordered list of data objects
static vtkCollection * New()
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkObject * GetNextItemAsObject()
helper class to get VTK data object types as string and instantiate them
vtkObject * GetItemAsObject(int i)
void AddItem(vtkDataObject *ds)