VTK
vtkRenderWindowCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderWindowCollection.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 =========================================================================*/
27 #ifndef vtkRenderWindowCollection_h
28 #define vtkRenderWindowCollection_h
29 
30 #include "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkCollection.h"
32 #include "vtkRenderWindow.h" // Needed for static cast
33 
34 class VTKRENDERINGCORE_EXPORT vtkRenderWindowCollection : public vtkCollection
35 {
36  public:
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
45  {
46  this->vtkCollection::AddItem(a);
47  }
48 
54  {
55  return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject());
56  }
57 
63  {
64  return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject(cookie));
65  }
66 
67 protected:
70 
71 private:
72  // hide the standard AddItem from the user and the compiler.
73  void AddItem(vtkObject *o)
74  {
75  this->vtkCollection::AddItem(o);
76  }
77 
78 private:
79  vtkRenderWindowCollection(const vtkRenderWindowCollection&) VTK_DELETE_FUNCTION;
80  void operator=(const vtkRenderWindowCollection&) VTK_DELETE_FUNCTION;
81 };
82 #endif
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkRenderWindow * GetNextItem()
Get the next RenderWindow in the list.
vtkRenderWindow * GetNextRenderWindow(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCollection * New()
Construct with empty list.
void AddItem(vtkRenderWindow *a)
Add a RenderWindow to the list.
void AddItem(vtkObject *)
Add an object to the list.
create a window for renderers to draw into
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkObject * GetNextItemAsObject()
Get the next item in the collection.