Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Common/vtkObjectFactoryCollection.h

Go to the documentation of this file.
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 protected:
00049   vtkObjectFactoryCollection() {};
00050   ~vtkObjectFactoryCollection() {};
00051 
00052 
00053 private:
00054   // hide the standard AddItem from the user and the compiler.
00055   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00056 
00057 private:
00058   vtkObjectFactoryCollection(const vtkObjectFactoryCollection&);  // Not implemented.
00059   void operator=(const vtkObjectFactoryCollection&);  // Not implemented.
00060 };
00061 
00062 
00063 #endif