VTK
dox/Rendering/Core/vtkCullerCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCullerCollection.h
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 =========================================================================*/
00026 #ifndef __vtkCullerCollection_h
00027 #define __vtkCullerCollection_h
00028 
00029 #include "vtkRenderingCoreModule.h" // For export macro
00030 #include "vtkCollection.h"
00031 #include "vtkCuller.h" // for inline functions
00032 
00033 class VTKRENDERINGCORE_EXPORT vtkCullerCollection : public vtkCollection
00034 {
00035  public:
00036   static vtkCullerCollection *New();
00037   vtkTypeMacro(vtkCullerCollection,vtkCollection);
00038   virtual void PrintSelf(ostream& os, vtkIndent indent);
00039 
00041 
00042   void AddItem(vtkCuller *a)
00043     {
00044       this->vtkCollection::AddItem(a);
00045     }
00047 
00049 
00050   vtkCuller *GetNextItem()
00051     {
00052       return static_cast<vtkCuller *>(this->GetNextItemAsObject());
00053     }
00055 
00057   vtkCuller *GetLastItem();
00058 
00059   //BTX
00061 
00063   vtkCuller *GetNextCuller(vtkCollectionSimpleIterator &cookie)
00064     {
00065       return static_cast<vtkCuller *>(this->GetNextItemAsObject(cookie));
00066     }
00067   //ETX
00069 
00070 protected:
00071   vtkCullerCollection() {}
00072   ~vtkCullerCollection() {}
00073 
00074 private:
00075   // hide the standard AddItem from the user and the compiler.
00076   void AddItem(vtkObject *o)
00077     {
00078       this->vtkCollection::AddItem(o);
00079     }
00080 
00081 private:
00082   vtkCullerCollection(const vtkCullerCollection&);  // Not implemented.
00083   void operator=(const vtkCullerCollection&);  // Not implemented.
00084 };
00085 
00086 
00087 inline vtkCuller *vtkCullerCollection::GetLastItem()
00088 {
00089   if ( this->Bottom == NULL )
00090     {
00091     return NULL;
00092     }
00093   else
00094     {
00095     return static_cast<vtkCuller *>(this->Bottom->Item);
00096     }
00097 }
00098 
00099 #endif
00100 
00101 
00102 
00103 
00104