Common/vtkObjectFactoryCollection.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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   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 =========================================================================*/
    00043 #ifndef __vtkObjectFactoryCollection_h
    00044 #define __vtkObjectFactoryCollection_h
    00045
    00046 #include "vtkCollection.h"
    00047
    00048 #include "vtkObjectFactory.h" // Needed for inline methods
    00049
    00050 class VTK_COMMON_EXPORT vtkObjectFactoryCollection : public vtkCollection
    00051 {
    00052 public:
    00053   vtkTypeRevisionMacro(vtkObjectFactoryCollection,vtkCollection);
    00054   static vtkObjectFactoryCollection *New();
    00055
    00057   void AddItem(vtkObjectFactory *t) { this->vtkCollection::AddItem((vtkObject *)t); }
    00058
    00060
    00062   vtkObjectFactory *GetNextItem()
    00063     { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
    00065
    00066 protected:
    00067   vtkObjectFactoryCollection() {};
    00068   ~vtkObjectFactoryCollection() {};
    00069
    00070
    00071 private:
    00072   // hide the standard AddItem from the user and the compiler.
    00073   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
    00074
    00075 private:
    00076   vtkObjectFactoryCollection(const vtkObjectFactoryCollection&);  // Not implemented.
    00077   void operator=(const vtkObjectFactoryCollection&);  // Not implemented.
    00078 };
    00079
    00080
    00081 #endif