VTK
vtkObjectFactoryCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkObjectFactoryCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef vtkObjectFactoryCollection_h
26 #define vtkObjectFactoryCollection_h
27 
28 #include "vtkCommonCoreModule.h" // For export macro
29 #include "vtkCollection.h"
30 
31 #include "vtkObjectFactory.h" // Needed for inline methods
32 
34 {
35 public:
38 
40 
42  {
43  this->vtkCollection::AddItem(t);
44  }
46 
48 
51  { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
53 
54  //BTX
56 
59  return static_cast<vtkObjectFactory *>(
60  this->GetNextItemAsObject(cookie));};
61  //ETX
63 
64 protected:
67 
68 
69 private:
70  // hide the standard AddItem from the user and the compiler.
71  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
72 
73 private:
74  vtkObjectFactoryCollection(const vtkObjectFactoryCollection&); // Not implemented.
75  void operator=(const vtkObjectFactoryCollection&); // Not implemented.
76 };
77 
78 
79 #endif
80 // VTK-HeaderTest-Exclude: vtkObjectFactoryCollection.h
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkObjectFactory * GetNextObjectFactory(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKCOMMONCORE_EXPORT
static vtkCollection * New()
maintain a list of object factories
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
void AddItem(vtkObjectFactory *t)
abstract base class for vtkObjectFactories
vtkObject * GetNextItemAsObject()