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 =========================================================================*/ 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 vtkTypeRevisionMacro(vtkObjectFactoryCollection,vtkCollection); 00036 static vtkObjectFactoryCollection *New(); 00037 00039 void AddItem(vtkObjectFactory *t) { this->vtkCollection::AddItem((vtkObject *)t); } 00040 00042 00044 vtkObjectFactory *GetNextItem() 00045 { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());} 00047 00048 //BTX 00050 00052 vtkObjectFactory *GetNextObjectFactory(vtkCollectionSimpleIterator &cookie) { 00053 return static_cast<vtkObjectFactory *>( 00054 this->GetNextItemAsObject(cookie));}; 00055 //ETX 00057 00058 protected: 00059 vtkObjectFactoryCollection() {}; 00060 ~vtkObjectFactoryCollection() {}; 00061 00062 00063 private: 00064 // hide the standard AddItem from the user and the compiler. 00065 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00066 00067 private: 00068 vtkObjectFactoryCollection(const vtkObjectFactoryCollection&); // Not implemented. 00069 void operator=(const vtkObjectFactoryCollection&); // Not implemented. 00070 }; 00071 00072 00073 #endif