VTK  9.3.0
vtkImplicitFunctionCollection.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkImplicitFunctionCollection_h
14 #define vtkImplicitFunctionCollection_h
15 
16 #include "vtkCollection.h"
17 #include "vtkCommonDataModelModule.h" // For export macro
18 
19 #include "vtkImplicitFunction.h" // Needed for inline methods
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitFunctionCollection : public vtkCollection
23 {
24 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
33 
37  vtkImplicitFunction* GetNextItem();
38 
40 
45  {
46  return static_cast<vtkImplicitFunction*>(this->GetNextItemAsObject(cookie));
47  }
49 
50 protected:
52  ~vtkImplicitFunctionCollection() override = default;
53 
54 private:
55  // hide the standard AddItem from the user and the compiler.
56  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
57 
59  void operator=(const vtkImplicitFunctionCollection&) = delete;
60 };
61 
63 {
64  this->vtkCollection::AddItem(f);
65 }
66 
68 {
69  return static_cast<vtkImplicitFunction*>(this->GetNextItemAsObject());
70 }
71 
72 VTK_ABI_NAMESPACE_END
73 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
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 implicit functions
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkImplicitFunctionCollection() override=default
vtkImplicitFunction * GetNextImplicitFunction(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkImplicitFunction * GetNextItem()
Get the next implicit function in the list.
void AddItem(vtkImplicitFunction *)
Add an implicit function to the list.
static vtkImplicitFunctionCollection * New()
abstract interface for implicit functions
a simple class to control print indentation
Definition: vtkIndent.h:29
abstract base class for most VTK objects
Definition: vtkObject.h:52
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40