1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkPropCollection.h,v $
6 Date: $Date: 2002/12/26 18:24:21 $
7 Version: $Revision: 1.20 $
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 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.
25 // vtkProp vtkCollection
30 #include "vtkCollection.h"
32 #include "vtkProp.h" // Needed for inline methods
34 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
37 static vtkPropCollection *New();
38 vtkTypeRevisionMacro(vtkPropCollection,vtkCollection);
41 // Add an Prop to the list.
42 void AddItem(vtkProp *a);
45 // Get the next Prop in the list.
46 vtkProp *GetNextProp();
49 // Get the last Prop in the list.
50 vtkProp *GetLastProp();
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();
60 vtkPropCollection() {};
61 ~vtkPropCollection() {};
65 // hide the standard AddItem from the user and the compiler.
66 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
69 vtkPropCollection(const vtkPropCollection&); // Not implemented.
70 void operator=(const vtkPropCollection&); // Not implemented.
73 inline void vtkPropCollection::AddItem(vtkProp *a)
75 this->vtkCollection::AddItem((vtkObject *)a);
78 inline vtkProp *vtkPropCollection::GetNextProp()
80 return static_cast<vtkProp *>(this->GetNextItemAsObject());
83 inline vtkProp *vtkPropCollection::GetLastProp()
85 if ( this->Bottom == NULL )
91 return static_cast<vtkProp *>(this->Bottom->Item);