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 =========================================================================*/
32 #ifndef vtkObjectFactoryCollection_h
33 #define vtkObjectFactoryCollection_h
34 
35 #include "vtkCommonCoreModule.h" // For export macro
36 #include "vtkCollection.h"
37 
38 #include "vtkObjectFactory.h" // Needed for inline methods
39 
40 class VTKCOMMONCORE_EXPORT vtkObjectFactoryCollection : public vtkCollection
41 {
42 public:
45 
50  {
51  this->vtkCollection::AddItem(t);
52  }
53 
59  { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
60 
66  return static_cast<vtkObjectFactory *>(
67  this->GetNextItemAsObject(cookie));};
68 
69 protected:
72 
73 
74 private:
75  // hide the standard AddItem from the user and the compiler.
76  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
77 
78 private:
80  void operator=(const vtkObjectFactoryCollection&) = delete;
81 };
82 
83 
84 #endif
85 // VTK-HeaderTest-Exclude: vtkObjectFactoryCollection.h
vtkCollection::New
static vtkCollection * New()
Construct with empty list.
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkCollection.h
vtkObjectFactoryCollection::~vtkObjectFactoryCollection
~vtkObjectFactoryCollection() override
Definition: vtkObjectFactoryCollection.h:71
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkObjectFactory.h
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:177
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:51
vtkObjectFactory
abstract base class for vtkObjectFactories
Definition: vtkObjectFactory.h:57
vtkObjectFactoryCollection::GetNextObjectFactory
vtkObjectFactory * GetNextObjectFactory(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkObjectFactoryCollection.h:65
vtkObjectFactoryCollection::GetNextItem
vtkObjectFactory * GetNextItem()
Get the next ObjectFactory in the list.
Definition: vtkObjectFactoryCollection.h:58
vtkObjectFactoryCollection
maintain a list of object factories
Definition: vtkObjectFactoryCollection.h:40
vtkObjectFactoryCollection::AddItem
void AddItem(vtkObjectFactory *t)
Add an ObjectFactory the bottom of the list.
Definition: vtkObjectFactoryCollection.h:49
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObjectFactoryCollection::vtkObjectFactoryCollection
vtkObjectFactoryCollection()
Definition: vtkObjectFactoryCollection.h:70