VTK  9.0.3
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 =========================================================================*/
26 #ifndef vtkObjectFactoryCollection_h
27 #define vtkObjectFactoryCollection_h
28 
29 #include "vtkCollection.h"
30 #include "vtkCommonCoreModule.h" // For export macro
31 
32 #include "vtkObjectFactory.h" // Needed for inline methods
33 
34 class VTKCOMMONCORE_EXPORT vtkObjectFactoryCollection : public vtkCollection
35 {
36 public:
39 
44 
50  {
51  return static_cast<vtkObjectFactory*>(this->GetNextItemAsObject());
52  }
53 
59  {
60  return static_cast<vtkObjectFactory*>(this->GetNextItemAsObject(cookie));
61  }
62 
63 protected:
66 
67 private:
68  // hide the standard AddItem from the user and the compiler.
69  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
70 
71 private:
73  void operator=(const vtkObjectFactoryCollection&) = delete;
74 };
75 
76 #endif
77 // VTK-HeaderTest-Exclude: vtkObjectFactoryCollection.h
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
maintain a list of object factories
void AddItem(vtkObjectFactory *t)
Add an ObjectFactory the bottom of the list.
vtkObjectFactory * GetNextItem()
Get the next ObjectFactory in the list.
vtkObjectFactory * GetNextObjectFactory(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
static vtkObjectFactoryCollection * New()
abstract base class for vtkObjectFactories
abstract base class for most VTK objects
Definition: vtkObject.h:54
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48