Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCullerCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCullerCollection.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00040 #ifndef __vtkCullerC_h
00041 #define __vtkCullerC_h
00042 
00043 #include "vtkCollection.h"
00044 #include "vtkCuller.h" // for inline functions
00045 
00046 class VTK_RENDERING_EXPORT vtkCullerCollection : public vtkCollection
00047 {
00048  public:
00049   static vtkCullerCollection *New();
00050   vtkTypeRevisionMacro(vtkCullerCollection,vtkCollection);
00051   virtual void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00055   void AddItem(vtkCuller *a) {
00056     this->vtkCollection::AddItem((vtkObject *)a);};
00058 
00060 
00061   vtkCuller *GetNextItem() { 
00062     return static_cast<vtkCuller *>(this->GetNextItemAsObject());};
00064   
00066   vtkCuller *GetLastItem();
00067   
00068   //BTX
00070 
00072   vtkCuller *GetNextCuller(vtkCollectionSimpleIterator &cookie) {
00073     return static_cast<vtkCuller *>(this->GetNextItemAsObject(cookie));};
00074   //ETX
00076 
00077 protected:
00078   vtkCullerCollection() {};
00079   ~vtkCullerCollection() {};
00080   
00081 
00082 private:
00083   // hide the standard AddItem from the user and the compiler.
00084   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00085 
00086 private:
00087   vtkCullerCollection(const vtkCullerCollection&);  // Not implemented.
00088   void operator=(const vtkCullerCollection&);  // Not implemented.
00089 };
00090 
00091 
00092 inline vtkCuller *vtkCullerCollection::GetLastItem() 
00093 { 
00094   if ( this->Bottom == NULL )
00095     {
00096     return NULL;
00097     }
00098   else
00099     {
00100     return static_cast<vtkCuller *>(this->Bottom->Item);
00101     }
00102 }
00103 
00104 #endif
00105 
00106 
00107 
00108 
00109