OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkPropCollection.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkPropCollection.h,v $
5   Language:  C++
6   Date:      $Date: 2002/12/26 18:24:21 $
7   Version:   $Revision: 1.20 $
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 vtkPropCollection - a list of Props
19 // .SECTION Description
20 // vtkPropCollection represents and provides methods to manipulate a list of
21 // Props (i.e., vtkProp and subclasses). The list is unsorted and duplicate
22 // entries are not prevented.
23
24 // .SECTION see also
25 // vtkProp vtkCollection 
26
27 #ifndef __vtkPropC_h
28 #define __vtkPropC_h
29
30 #include "vtkCollection.h"
31
32 #include "vtkProp.h" // Needed for inline methods
33
34 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
35 {
36  public:
37   static vtkPropCollection *New();
38   vtkTypeRevisionMacro(vtkPropCollection,vtkCollection);
39
40   // Description:
41   // Add an Prop to the list.
42   void AddItem(vtkProp *a);
43
44   // Description:
45   // Get the next Prop in the list.
46   vtkProp *GetNextProp();
47
48   // Description:
49   // Get the last Prop in the list.
50   vtkProp *GetLastProp();
51   
52   // Description:
53   // Get the number of paths contained in this list. (Recall that a
54   // vtkProp can consist of multiple parts.) Used in picking and other
55   // activities to get the parts of composite entities like vtkAssembly
56   // or vtkPropAssembly.
57   int GetNumberOfPaths();
58   
59 protected:
60   vtkPropCollection() {};
61   ~vtkPropCollection() {};
62   
63
64 private:
65   // hide the standard AddItem from the user and the compiler.
66   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
67
68 private:
69   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
70   void operator=(const vtkPropCollection&);  // Not implemented.
71 };
72
73 inline void vtkPropCollection::AddItem(vtkProp *a) 
74 {
75   this->vtkCollection::AddItem((vtkObject *)a);
76 }
77
78 inline vtkProp *vtkPropCollection::GetNextProp() 
79
80   return static_cast<vtkProp *>(this->GetNextItemAsObject());
81 }
82
83 inline vtkProp *vtkPropCollection::GetLastProp() 
84
85   if ( this->Bottom == NULL )
86     {
87     return NULL;
88     }
89   else
90     {
91     return static_cast<vtkProp *>(this->Bottom->Item);
92     }
93 }
94
95 #endif
96
97
98
99
100