VTK
vtkAssemblyPaths.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAssemblyPaths.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 =========================================================================*/
27 #ifndef vtkAssemblyPaths_h
28 #define vtkAssemblyPaths_h
29 
30 #include "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkCollection.h"
32 
33 #include "vtkAssemblyPath.h" // Needed for inline methods
34 
35 class vtkProp;
36 
37 class VTKRENDERINGCORE_EXPORT vtkAssemblyPaths : public vtkCollection
38 {
39 public:
40  static vtkAssemblyPaths *New();
42 
46  void AddItem(vtkAssemblyPath *p);
47 
51  void RemoveItem(vtkAssemblyPath *p);
52 
58 
62  vtkAssemblyPath *GetNextItem();
63 
68  virtual vtkMTimeType GetMTime();
69 
75  { return static_cast<vtkAssemblyPath *>(this->GetNextItemAsObject(cookie)); }
76 
77 protected:
80 
81 private:
82  // hide the standard AddItem from the user and the compiler.
83  void AddItem(vtkObject *o)
84  { this->vtkCollection::AddItem(o); }
85  void RemoveItem(vtkObject *o)
86  { this->vtkCollection::RemoveItem(o); }
87  void RemoveItem(int i)
88  { this->vtkCollection::RemoveItem(i); }
89  int IsItemPresent(vtkObject *o)
90  { return this->vtkCollection::IsItemPresent(o); }
91 private:
92  vtkAssemblyPaths(const vtkAssemblyPaths&) VTK_DELETE_FUNCTION;
93  void operator=(const vtkAssemblyPaths&) VTK_DELETE_FUNCTION;
94 };
95 
96 inline void vtkAssemblyPaths::AddItem(vtkAssemblyPath *p)
97 {
98  this->vtkCollection::AddItem(p);
99 }
100 
102 {
103  this->vtkCollection::RemoveItem(p);
104 }
105 
107 {
108  return this->vtkCollection::IsItemPresent(p);
109 }
110 
112 {
113  return static_cast<vtkAssemblyPath *>(this->GetNextItemAsObject());
114 }
115 
116 #endif
117 // VTK-HeaderTest-Exclude: vtkAssemblyPaths.h
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:50
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkAssemblyPath * GetNextItem()
Get the next path in the list.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
int IsItemPresent(vtkObject *a)
Search for an object and return location in list.
a list of nodes that form an assembly path
static vtkCollection * New()
Construct with empty list.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
a list of lists of props representing an assembly hierarchy
void RemoveItem(vtkAssemblyPath *p)
Remove a path from the list.
void AddItem(vtkObject *)
Add an object to the list.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
int IsItemPresent(vtkAssemblyPath *p)
Determine whether a particular path is present.
void RemoveItem(int i)
Remove the i'th item in the list.
vtkAssemblyPath * GetNextPath(vtkCollectionSimpleIterator &cookie)
Reentrant safe way to get an object in a collection.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.