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

dox/Common/vtkObjectFactoryCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkObjectFactoryCollection.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00029 #ifndef __vtkObjectFactoryCollection_h
00030 #define __vtkObjectFactoryCollection_h
00031 
00032 #include "vtkCollection.h"
00033 
00034 #include "vtkObjectFactory.h" // Needed for inline methods
00035 
00036 class VTK_COMMON_EXPORT vtkObjectFactoryCollection : public vtkCollection
00037 {
00038 public:
00039   vtkTypeRevisionMacro(vtkObjectFactoryCollection,vtkCollection);
00040   static vtkObjectFactoryCollection *New();
00041 
00043   void AddItem(vtkObjectFactory *t) { this->vtkCollection::AddItem((vtkObject *)t); }
00044   
00046 
00048   vtkObjectFactory *GetNextItem() 
00049     { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
00051 
00052 protected:
00053   vtkObjectFactoryCollection() {};
00054   ~vtkObjectFactoryCollection() {};
00055 
00056 
00057 private:
00058   // hide the standard AddItem from the user and the compiler.
00059   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00060 
00061 private:
00062   vtkObjectFactoryCollection(const vtkObjectFactoryCollection&);  // Not implemented.
00063   void operator=(const vtkObjectFactoryCollection&);  // Not implemented.
00064 };
00065 
00066 
00067 #endif