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 =========================================================================*/
26 #ifndef __vtkAssemblyPaths_h
27 #define __vtkAssemblyPaths_h
28 
29 #include "vtkCollection.h"
30 
31 #include "vtkAssemblyPath.h" // Needed for inline methods
32 
33 class vtkProp;
34 
36 {
37 public:
38  static vtkAssemblyPaths *New();
40 
42  void AddItem(vtkAssemblyPath *p);
43 
45  void RemoveItem(vtkAssemblyPath *p);
46 
50 
52  vtkAssemblyPath *GetNextItem();
53 
56  virtual unsigned long GetMTime();
57 
58  //BTX
60 
63  return static_cast<vtkAssemblyPath *>(this->GetNextItemAsObject(cookie));};
64  //ETX
66 
67 protected:
70 
71 private:
72  // hide the standard AddItem from the user and the compiler.
73  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
74  void RemoveItem(vtkObject *o) { this->vtkCollection::RemoveItem(o); };
75  void RemoveItem(int i) { this->vtkCollection::RemoveItem(i); };
76  int IsItemPresent(vtkObject *o)
77  { return this->vtkCollection::IsItemPresent(o);};
78 private:
79  vtkAssemblyPaths(const vtkAssemblyPaths&); // Not implemented.
80  void operator=(const vtkAssemblyPaths&); // Not implemented.
81 };
82 
84 {
85  this->vtkCollection::AddItem(p);
86 }
87 
89 {
91 }
92 
94 {
95  return this->vtkCollection::IsItemPresent(p);
96 }
97 
99 {
100  return static_cast<vtkAssemblyPath *>(this->GetNextItemAsObject());
101 }
102 
103 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkAssemblyPath * GetNextItem()
int IsItemPresent(vtkObject *a)
a list of nodes that form an assembly path
virtual unsigned long GetMTime()
static vtkCollection * New()
#define VTK_COMMON_EXPORT
a list of lists of props representing an assembly hierarchy
void RemoveItem(vtkAssemblyPath *p)
void AddItem(vtkObject *)
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
int IsItemPresent(vtkAssemblyPath *p)
void RemoveItem(int i)
void AddItem(vtkAssemblyPath *p)
vtkAssemblyPath * GetNextPath(vtkCollectionSimpleIterator &cookie)
vtkObject * GetNextItemAsObject()