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 =========================================================================*/
25 #ifndef vtkDataObjectCollection_h
26 #define vtkDataObjectCollection_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
29 #include "vtkCollection.h"
30 
31 #include "vtkDataObject.h" // Needed for inline methods
32 
34 {
35 public:
36  static vtkDataObjectCollection *New();
38 
40 
42  {
43  this->vtkCollection::AddItem(ds);
44  }
46 
48 
50  {
51  return static_cast<vtkDataObject *>(this->GetNextItemAsObject());
52  }
54 
56 
58  {
59  return static_cast<vtkDataObject *>(this->GetItemAsObject(i));
60  }
62 
63  //BTX
65 
68  {
69  return static_cast<vtkDataObject *>(this->GetNextItemAsObject(cookie));
70  }
71  //ETX
73 
74 protected:
77 
78 
79 private:
80  // hide the standard AddItem from the user and the compiler.
81  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
82 
83 private:
84  vtkDataObjectCollection(const vtkDataObjectCollection&); // Not implemented.
85  void operator=(const vtkDataObjectCollection&); // Not implemented.
86 };
87 
88 
89 #endif
90 // VTK-HeaderTest-Exclude: vtkDataObjectCollection.h
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkDataObject * GetNextDataObject(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:61
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:52
vtkObject * GetNextItemAsObject()
general representation of visualization data
Definition: vtkDataObject.h:64
vtkObject * GetItemAsObject(int i)
#define VTKCOMMONDATAMODEL_EXPORT
void AddItem(vtkDataObject *ds)