00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkAssemblyPaths.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00026 #ifndef __vtkAssemblyPaths_h 00027 #define __vtkAssemblyPaths_h 00028 00029 #include "vtkCollection.h" 00030 00031 #include "vtkAssemblyPath.h" // Needed for inline methods 00032 00033 class vtkProp; 00034 00035 class VTK_COMMON_EXPORT vtkAssemblyPaths : public vtkCollection 00036 { 00037 public: 00038 static vtkAssemblyPaths *New(); 00039 vtkTypeRevisionMacro(vtkAssemblyPaths,vtkCollection); 00040 00042 void AddItem(vtkAssemblyPath *p); 00043 00045 void RemoveItem(vtkAssemblyPath *p); 00046 00049 int IsItemPresent(vtkAssemblyPath *p); 00050 00052 vtkAssemblyPath *GetNextItem(); 00053 00056 virtual unsigned long GetMTime(); 00057 00058 //BTX 00060 00062 vtkAssemblyPath *GetNextPath(vtkCollectionSimpleIterator &cookie) { 00063 return static_cast<vtkAssemblyPath *>(this->GetNextItemAsObject(cookie));}; 00064 //ETX 00066 00067 protected: 00068 vtkAssemblyPaths() {}; 00069 ~vtkAssemblyPaths() {}; 00070 00071 private: 00072 // hide the standard AddItem from the user and the compiler. 00073 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00074 void RemoveItem(vtkObject *o) { this->vtkCollection::RemoveItem(o); }; 00075 void RemoveItem(int i) { this->vtkCollection::RemoveItem(i); }; 00076 int IsItemPresent(vtkObject *o) 00077 { return this->vtkCollection::IsItemPresent(o);}; 00078 private: 00079 vtkAssemblyPaths(const vtkAssemblyPaths&); // Not implemented. 00080 void operator=(const vtkAssemblyPaths&); // Not implemented. 00081 }; 00082 00083 inline void vtkAssemblyPaths::AddItem(vtkAssemblyPath *p) 00084 { 00085 this->vtkCollection::AddItem((vtkObject *)p); 00086 } 00087 00088 inline void vtkAssemblyPaths::RemoveItem(vtkAssemblyPath *p) 00089 { 00090 this->vtkCollection::RemoveItem((vtkObject *)p); 00091 } 00092 00093 inline int vtkAssemblyPaths::IsItemPresent(vtkAssemblyPath *p) 00094 { 00095 return this->vtkCollection::IsItemPresent((vtkObject *)p); 00096 } 00097 00098 inline vtkAssemblyPath *vtkAssemblyPaths::GetNextItem() 00099 { 00100 return (vtkAssemblyPath *)(this->GetNextItemAsObject()); 00101 } 00102 00103 #endif