VTK: Common/DataModel/vtkImplicitFunctionCollection.h Source File

| VTK 9.3.1

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:
25 vtkTypeMacro(vtkImplicitFunctionCollection, vtkCollection);
26 static vtkImplicitFunctionCollection* New();
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
32 void AddItem(vtkImplicitFunction*);
33
37 vtkImplicitFunction* GetNextItem();
38
40
44 vtkImplicitFunction* GetNextImplicitFunction(vtkCollectionSimpleIterator& cookie)
45 {
46 return static_cast<vtkImplicitFunction*>(this->GetNextItemAsObject(cookie));
47 }
49
50 protected:
51 vtkImplicitFunctionCollection() = default;
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
58 vtkImplicitFunctionCollection(const vtkImplicitFunctionCollection&) = delete;
59 void operator=(const vtkImplicitFunctionCollection&) = delete;
60 };
61
62 inline void vtkImplicitFunctionCollection::AddItem(vtkImplicitFunction* f)
63 {
64 this->vtkCollection::AddItem(f);
65 }
66
67 inline vtkImplicitFunction* vtkImplicitFunctionCollection::GetNextItem()
68 {
69 return static_cast<vtkImplicitFunction*>(this->GetNextItemAsObject());
70 }
71
72 VTK_ABI_NAMESPACE_END
73 #endif
vtkCollection
create and manipulate ordered lists of objects
Definition: vtkCollection.h:45
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:177
vtkImplicitFunctionCollection
maintain a list of implicit functions
Definition: vtkImplicitFunctionCollection.h:23
vtkImplicitFunctionCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImplicitFunctionCollection::~vtkImplicitFunctionCollection
~vtkImplicitFunctionCollection() override=default
vtkImplicitFunctionCollection::vtkImplicitFunctionCollection
vtkImplicitFunctionCollection()=default
vtkImplicitFunctionCollection::GetNextImplicitFunction
vtkImplicitFunction * GetNextImplicitFunction(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
Definition: vtkImplicitFunctionCollection.h:44
vtkImplicitFunctionCollection::GetNextItem
vtkImplicitFunction * GetNextItem()
Get the next implicit function in the list.
Definition: vtkImplicitFunctionCollection.h:67
vtkImplicitFunctionCollection::AddItem
void AddItem(vtkImplicitFunction *)
Add an implicit function to the list.
Definition: vtkImplicitFunctionCollection.h:62
vtkImplicitFunctionCollection::New
static vtkImplicitFunctionCollection * New()
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:59
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkCollection.h
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:40
vtkImplicitFunction.h