1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkCullerCollection.h,v $
6 Date: $Date: 2002/08/22 18:39:30 $
7 Version: $Revision: 1.21 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkCullerCollection - a list of Cullers
19 // .SECTION Description
20 // vtkCullerCollection represents and provides methods to manipulate a list
21 // of Cullers (i.e., vtkCuller and subclasses). The list is unsorted and
22 // duplicate entries are not prevented.
25 // vtkCuller vtkCollection
27 #ifndef __vtkCullerC_h
28 #define __vtkCullerC_h
30 #include "vtkCollection.h"
31 #include "vtkCuller.h" // for inline functions
33 class VTK_RENDERING_EXPORT vtkCullerCollection : public vtkCollection
36 static vtkCullerCollection *New();
37 vtkTypeRevisionMacro(vtkCullerCollection,vtkCollection);
38 virtual void PrintSelf(ostream& os, vtkIndent indent);
41 // Add an Culler to the list.
42 void AddItem(vtkCuller *a) {
43 this->vtkCollection::AddItem((vtkObject *)a);};
46 // Get the next Culler in the list.
47 vtkCuller *GetNextItem() {
48 return static_cast<vtkCuller *>(this->GetNextItemAsObject());};
51 // Get the last Culler in the list.
52 vtkCuller *GetLastItem();
55 vtkCullerCollection() {};
56 ~vtkCullerCollection() {};
60 // hide the standard AddItem from the user and the compiler.
61 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
64 vtkCullerCollection(const vtkCullerCollection&); // Not implemented.
65 void operator=(const vtkCullerCollection&); // Not implemented.
69 inline vtkCuller *vtkCullerCollection::GetLastItem()
71 if ( this->Bottom == NULL )
77 return static_cast<vtkCuller *>(this->Bottom->Item);