VTK
dox/Rendering/vtkRenderWindowCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRenderWindowCollection.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00026 #ifndef __vtkRenderWindowCollection_h
00027 #define __vtkRenderWindowCollection_h
00028 
00029 #include "vtkCollection.h"
00030 #include "vtkRenderWindow.h" // Needed for static cast
00031 
00032 class VTK_RENDERING_EXPORT vtkRenderWindowCollection : public vtkCollection
00033 {
00034  public:
00035   static vtkRenderWindowCollection *New();
00036   vtkTypeMacro(vtkRenderWindowCollection,vtkCollection);
00037   virtual void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040 
00041   void AddItem(vtkRenderWindow *a)
00042     {
00043       this->vtkCollection::AddItem(a);
00044     }
00046   
00048 
00050   vtkRenderWindow *GetNextItem()
00051     {
00052       return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject());
00053     }
00055   
00056   //BTX
00058 
00060   vtkRenderWindow *GetNextRenderWindow(vtkCollectionSimpleIterator &cookie)
00061     {
00062       return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject(cookie));
00063     }
00064   //ETX
00066 
00067 protected:
00068   vtkRenderWindowCollection() {}
00069   ~vtkRenderWindowCollection() {}
00070 
00071 private:
00072   // hide the standard AddItem from the user and the compiler.
00073   void AddItem(vtkObject *o)
00074     {
00075       this->vtkCollection::AddItem(o);
00076     }
00077 
00078 private:
00079   vtkRenderWindowCollection(const vtkRenderWindowCollection&);  // Not implemented.
00080   void operator=(const vtkRenderWindowCollection&);  // Not implemented.
00081 };
00082 #endif