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 =========================================================================*/
32 #ifndef __vtkPropCollection_h
33 #define __vtkPropCollection_h
34 
35 #include "vtkCollection.h"
36 
37 #include "vtkProp.h" // Needed for inline methods
38 
40 {
41  public:
42  static vtkPropCollection *New();
44 
46  void AddItem(vtkProp *a);
47 
49  vtkProp *GetNextProp();
50 
52  vtkProp *GetLastProp();
53 
58  int GetNumberOfPaths();
59 
60  //BTX
62 
65  return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
66  //ETX
68 
69 protected:
72 
73 
74 private:
75  // hide the standard AddItem from the user and the compiler.
76  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
77 
78 private:
79  vtkPropCollection(const vtkPropCollection&); // Not implemented.
80  void operator=(const vtkPropCollection&); // Not implemented.
81 };
82 
84 {
85  this->vtkCollection::AddItem(a);
86 }
87 
89 {
90  return static_cast<vtkProp *>(this->GetNextItemAsObject());
91 }
92 
94 {
95  if ( this->Bottom == NULL )
96  {
97  return NULL;
98  }
99  else
100  {
101  return static_cast<vtkProp *>(this->Bottom->Item);
102  }
103 }
104 
105 #endif
106 
107 
108 
109 
110 
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
vtkProp * GetNextProp(vtkCollectionSimpleIterator &cookie)
abstract base class for most VTK objects
Definition: vtkObject.h:60
a list of Props
static vtkCollection * New()
vtkProp * GetLastProp()
#define VTK_COMMON_EXPORT
vtkCollectionElement * Bottom
void AddItem(vtkObject *)
void AddItem(vtkProp *a)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
vtkProp * GetNextProp()
vtkObject * GetNextItemAsObject()