VTK  9.3.0
vtkCullerCollection.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
24#ifndef vtkCullerCollection_h
25#define vtkCullerCollection_h
26
27#include "vtkCollection.h"
28#include "vtkCuller.h" // for inline functions
29#include "vtkRenderingCoreModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class VTKRENDERINGCORE_EXPORT vtkCullerCollection : public vtkCollection
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
43
47 vtkCuller* GetNextItem() { return static_cast<vtkCuller*>(this->GetNextItemAsObject()); }
48
52 vtkCuller* GetLastItem();
53
59 {
60 return static_cast<vtkCuller*>(this->GetNextItemAsObject(cookie));
61 }
62
63protected:
65 ~vtkCullerCollection() override = default;
66
67private:
68 // hide the standard AddItem from the user and the compiler.
69 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
70
72 void operator=(const vtkCullerCollection&) = delete;
73};
74
76{
77 if (this->Bottom == nullptr)
78 {
79 return nullptr;
80 }
81 else
82 {
83 return static_cast<vtkCuller*>(this->Bottom->Item);
84 }
85}
86
87VTK_ABI_NAMESPACE_END
88#endif
create and manipulate ordered lists of objects
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
an ordered list of Cullers
void AddItem(vtkCuller *a)
Add an Culler to the bottom of the list.
vtkCuller * GetNextItem()
Get the next Culler in the list.
vtkCuller * GetNextCuller(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
~vtkCullerCollection() override=default
static vtkCullerCollection * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCuller * GetLastItem()
Get the last Culler in the list.
vtkCullerCollection()=default
a superclass for prop cullers
Definition vtkCuller.h:30
a simple class to control print indentation
Definition vtkIndent.h:38
abstract base class for most VTK objects
Definition vtkObject.h:58
void * vtkCollectionSimpleIterator