VTK
vtkPolyDataCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataCollection.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 vtkPolyDataCollection_h
26 #define vtkPolyDataCollection_h
27 
28 #include "vtkCommonDataModelModule.h" // For export macro
29 #include "vtkCollection.h"
30 
31 #include "vtkPolyData.h" // Needed for static cast
32 
34 {
35 public:
36  static vtkPolyDataCollection *New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
42  void AddItem(vtkPolyData *pd)
43  {
44  this->vtkCollection::AddItem(pd);
45  }
47 
49 
51  return static_cast<vtkPolyData *>(this->GetNextItemAsObject());};
53 
54  //BTX
56 
59  return static_cast<vtkPolyData *>(this->GetNextItemAsObject(cookie));};
60  //ETX
62 
63 protected:
66 
67 private:
68  // hide the standard AddItem from the user and the compiler.
69  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
70 
71 private:
72  vtkPolyDataCollection(const vtkPolyDataCollection&); // Not implemented.
73  void operator=(const vtkPolyDataCollection&); // Not implemented.
74 };
75 
76 
77 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:61
void PrintSelf(ostream &os, vtkIndent indent)
vtkPolyData * GetNextPolyData(vtkCollectionSimpleIterator &cookie)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkCollection * New()
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
void AddItem(vtkPolyData *pd)
vtkObject * GetNextItemAsObject()
maintain a list of polygonal data objects
#define VTKCOMMONDATAMODEL_EXPORT