VTK
dox/Common/Core/vtkObjectFactoryCollection.h
Go to the documentation of this file.
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 "vtkCommonCoreModule.h" // For export macro
00029 #include "vtkCollection.h"
00030 
00031 #include "vtkObjectFactory.h" // Needed for inline methods
00032 
00033 class VTKCOMMONCORE_EXPORT vtkObjectFactoryCollection : public vtkCollection
00034 {
00035 public:
00036   vtkTypeMacro(vtkObjectFactoryCollection,vtkCollection);
00037   static vtkObjectFactoryCollection *New();
00038 
00040 
00041   void AddItem(vtkObjectFactory *t)
00042     {
00043       this->vtkCollection::AddItem(t);
00044     }
00046 
00048 
00050   vtkObjectFactory *GetNextItem()
00051     { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
00053 
00054   //BTX
00056 
00058   vtkObjectFactory *GetNextObjectFactory(vtkCollectionSimpleIterator &cookie) {
00059     return static_cast<vtkObjectFactory *>(
00060       this->GetNextItemAsObject(cookie));};
00061   //ETX
00063 
00064 protected:
00065   vtkObjectFactoryCollection() {}
00066   ~vtkObjectFactoryCollection() {}
00067 
00068 
00069 private:
00070   // hide the standard AddItem from the user and the compiler.
00071   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00072 
00073 private:
00074   vtkObjectFactoryCollection(const vtkObjectFactoryCollection&);  // Not implemented.
00075   void operator=(const vtkObjectFactoryCollection&);  // Not implemented.
00076 };
00077 
00078 
00079 #endif
00080 // VTK-HeaderTest-Exclude: vtkObjectFactoryCollection.h