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 
38 class VTKRENDERINGCORE_EXPORT vtkPropCollection : public vtkCollection
39 {
40  public:
41  static vtkPropCollection *New();
43 
47  void AddItem(vtkProp *a);
48 
52  vtkProp *GetNextProp();
53 
57  vtkProp *GetLastProp();
58 
65  int GetNumberOfPaths();
66 
72  return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
73 
74 protected:
77 
78 
79 private:
80  // hide the standard AddItem from the user and the compiler.
81  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
82 
83 private:
84  vtkPropCollection(const vtkPropCollection&) VTK_DELETE_FUNCTION;
85  void operator=(const vtkPropCollection&) VTK_DELETE_FUNCTION;
86 };
87 
89 {
90  this->vtkCollection::AddItem(a);
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
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:47
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
vtkProp * GetNextProp(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
abstract base class for most VTK objects
Definition: vtkObject.h:59
a list of Props
static vtkCollection * New()
Construct with empty list.
vtkProp * GetLastProp()
Get the last Prop in the list.
void AddItem(vtkObject *)
Add an object to the list.
void AddItem(vtkProp *a)
Add an Prop to the list.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkProp * GetNextProp()
Get the next Prop in the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.