00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkObjectFactoryCollection.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 =========================================================================*/ 00025 #ifndef __vtkObjectFactoryCollection_h 00026 #define __vtkObjectFactoryCollection_h 00027 00028 #include "vtkCollection.h" 00029 00030 #include "vtkObjectFactory.h" // Needed for inline methods 00031 00032 class VTK_COMMON_EXPORT vtkObjectFactoryCollection : public vtkCollection 00033 { 00034 public: 00035 vtkTypeMacro(vtkObjectFactoryCollection,vtkCollection); 00036 static vtkObjectFactoryCollection *New(); 00037 00039 00040 void AddItem(vtkObjectFactory *t) 00041 { 00042 this->vtkCollection::AddItem(t); 00043 } 00045 00047 00049 vtkObjectFactory *GetNextItem() 00050 { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());} 00052 00053 //BTX 00055 00057 vtkObjectFactory *GetNextObjectFactory(vtkCollectionSimpleIterator &cookie) { 00058 return static_cast<vtkObjectFactory *>( 00059 this->GetNextItemAsObject(cookie));}; 00060 //ETX 00062 00063 protected: 00064 vtkObjectFactoryCollection() {}; 00065 ~vtkObjectFactoryCollection() {}; 00066 00067 00068 private: 00069 // hide the standard AddItem from the user and the compiler. 00070 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00071 00072 private: 00073 vtkObjectFactoryCollection(const vtkObjectFactoryCollection&); // Not implemented. 00074 void operator=(const vtkObjectFactoryCollection&); // Not implemented. 00075 }; 00076 00077 00078 #endif