VTK
vtkPropCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPropCollection.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
30#ifndef vtkPropCollection_h
31#define vtkPropCollection_h
32
33#include "vtkRenderingCoreModule.h" // For export macro
34#include "vtkCollection.h"
35
36#include "vtkProp.h" // Needed for inline methods
37
38class VTKRENDERINGCORE_EXPORT vtkPropCollection : public vtkCollection
39{
40 public:
43
47 void AddItem(vtkProp *a);
48
52 vtkProp *GetNextProp();
53
57 vtkProp *GetLastProp();
58
66
72 return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
73
74protected:
77
78
79private:
80 // hide the standard AddItem from the user and the compiler.
81 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
82
83private:
84 vtkPropCollection(const vtkPropCollection&) VTK_DELETE_FUNCTION;
85 void operator=(const vtkPropCollection&) VTK_DELETE_FUNCTION;
86};
87
89{
91}
92
94{
95 return static_cast<vtkProp *>(this->GetNextItemAsObject());
96}
97
99{
100 if ( this->Bottom == NULL )
101 {
102 return NULL;
103 }
104 else
105 {
106 return static_cast<vtkProp *>(this->Bottom->Item);
107 }
108}
109
110#endif
111
112
113
114
115
116// VTK-HeaderTest-Exclude: vtkPropCollection.h
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
Add an object to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
abstract base class for most VTK objects
Definition: vtkObject.h:60
a list of Props
void AddItem(vtkProp *a)
Add an Prop to the list.
vtkProp * GetNextProp(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
int GetNumberOfPaths()
Get the number of paths contained in this list.
static vtkPropCollection * New()
vtkProp * GetLastProp()
Get the last Prop in the list.
vtkProp * GetNextProp()
Get the next Prop in the list.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47