VTK  9.0.3
vtkCullerCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCullerCollection.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 =========================================================================*/
27 #ifndef vtkCullerCollection_h
28 #define vtkCullerCollection_h
29 
30 #include "vtkCollection.h"
31 #include "vtkCuller.h" // for inline functions
32 #include "vtkRenderingCoreModule.h" // For export macro
33 
34 class VTKRENDERINGCORE_EXPORT vtkCullerCollection : public vtkCollection
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
44  void AddItem(vtkCuller* a) { this->vtkCollection::AddItem(a); }
45 
49  vtkCuller* GetNextItem() { return static_cast<vtkCuller*>(this->GetNextItemAsObject()); }
50 
54  vtkCuller* GetLastItem();
55 
61  {
62  return static_cast<vtkCuller*>(this->GetNextItemAsObject(cookie));
63  }
64 
65 protected:
67  ~vtkCullerCollection() override {}
68 
69 private:
70  // hide the standard AddItem from the user and the compiler.
71  void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
72 
73 private:
75  void operator=(const vtkCullerCollection&) = delete;
76 };
77 
79 {
80  if (this->Bottom == nullptr)
81  {
82  return nullptr;
83  }
84  else
85  {
86  return static_cast<vtkCuller*>(this->Bottom->Item);
87  }
88 }
89 
90 #endif
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
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
vtkCuller * GetNextCuller(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
void AddItem(vtkCuller *a)
Add an Culler to the bottom of the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCuller * GetNextItem()
Get the next Culler in the list.
vtkCuller * GetLastItem()
Get the last Culler in the list.
static vtkCullerCollection * New()
a superclass for prop cullers
Definition: vtkCuller.h:38
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:54
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48