VTK
dox/Rendering/Core/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 "vtkRenderingCoreModule.h" // For export macro
00030 #include "vtkCollection.h"
00031 #include "vtkRenderWindow.h" // Needed for static cast
00032 
00033 class VTKRENDERINGCORE_EXPORT vtkRenderWindowCollection : public vtkCollection
00034 {
00035  public:
00036   static vtkRenderWindowCollection *New();
00037   vtkTypeMacro(vtkRenderWindowCollection,vtkCollection);
00038   virtual void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041 
00042   void AddItem(vtkRenderWindow *a)
00043     {
00044       this->vtkCollection::AddItem(a);
00045     }
00047 
00049 
00051   vtkRenderWindow *GetNextItem()
00052     {
00053       return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject());
00054     }
00056 
00057   //BTX
00059 
00061   vtkRenderWindow *GetNextRenderWindow(vtkCollectionSimpleIterator &cookie)
00062     {
00063       return static_cast<vtkRenderWindow *>(this->GetNextItemAsObject(cookie));
00064     }
00065   //ETX
00067 
00068 protected:
00069   vtkRenderWindowCollection() {}
00070   ~vtkRenderWindowCollection() {}
00071 
00072 private:
00073   // hide the standard AddItem from the user and the compiler.
00074   void AddItem(vtkObject *o)
00075     {
00076       this->vtkCollection::AddItem(o);
00077     }
00078 
00079 private:
00080   vtkRenderWindowCollection(const vtkRenderWindowCollection&);  // Not implemented.
00081   void operator=(const vtkRenderWindowCollection&);  // Not implemented.
00082 };
00083 #endif