00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkObjectFactoryCollection.h,v $ 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 =========================================================================*/ 00039 #ifndef __vtkObjectFactoryCollection_h 00040 #define __vtkObjectFactoryCollection_h 00041 00042 #include "vtkCollection.h" 00043 00044 #include "vtkObjectFactory.h" // Needed for inline methods 00045 00046 class VTK_COMMON_EXPORT vtkObjectFactoryCollection : public vtkCollection 00047 { 00048 public: 00049 vtkTypeRevisionMacro(vtkObjectFactoryCollection,vtkCollection); 00050 static vtkObjectFactoryCollection *New(); 00051 00053 void AddItem(vtkObjectFactory *t) { this->vtkCollection::AddItem((vtkObject *)t); } 00054 00056 00058 vtkObjectFactory *GetNextItem() 00059 { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());} 00061 00062 //BTX 00064 00066 vtkObjectFactory *GetNextObjectFactory(vtkCollectionSimpleIterator &cookie) { 00067 return static_cast<vtkObjectFactory *>( 00068 this->GetNextItemAsObject(cookie));}; 00069 //ETX 00071 00072 protected: 00073 vtkObjectFactoryCollection() {}; 00074 ~vtkObjectFactoryCollection() {}; 00075 00076 00077 private: 00078 // hide the standard AddItem from the user and the compiler. 00079 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00080 00081 private: 00082 vtkObjectFactoryCollection(const vtkObjectFactoryCollection&); // Not implemented. 00083 void operator=(const vtkObjectFactoryCollection&); // Not implemented. 00084 }; 00085 00086 00087 #endif