OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkCullerCollection.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkCullerCollection.h,v $
5   Language:  C++
6   Date:      $Date: 2002/08/22 18:39:30 $
7   Version:   $Revision: 1.21 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
23
24 // .SECTION see also
25 // vtkCuller vtkCollection 
26
27 #ifndef __vtkCullerC_h
28 #define __vtkCullerC_h
29
30 #include "vtkCollection.h"
31 #include "vtkCuller.h" // for inline functions
32
33 class VTK_RENDERING_EXPORT vtkCullerCollection : public vtkCollection
34 {
35  public:
36   static vtkCullerCollection *New();
37   vtkTypeRevisionMacro(vtkCullerCollection,vtkCollection);
38   virtual void PrintSelf(ostream& os, vtkIndent indent);
39
40   // Description:
41   // Add an Culler to the list.
42   void AddItem(vtkCuller *a) {
43     this->vtkCollection::AddItem((vtkObject *)a);};
44
45   // Description:
46   // Get the next Culler in the list.
47   vtkCuller *GetNextItem() { 
48     return static_cast<vtkCuller *>(this->GetNextItemAsObject());};
49   
50   // Description:
51   // Get the last Culler in the list.
52   vtkCuller *GetLastItem();
53   
54 protected:
55   vtkCullerCollection() {};
56   ~vtkCullerCollection() {};
57   
58
59 private:
60   // hide the standard AddItem from the user and the compiler.
61   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
62
63 private:
64   vtkCullerCollection(const vtkCullerCollection&);  // Not implemented.
65   void operator=(const vtkCullerCollection&);  // Not implemented.
66 };
67
68
69 inline vtkCuller *vtkCullerCollection::GetLastItem() 
70
71   if ( this->Bottom == NULL )
72     {
73     return NULL;
74     }
75   else
76     {
77     return static_cast<vtkCuller *>(this->Bottom->Item);
78     }
79 }
80
81 #endif
82
83
84
85
86