Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkPropCollection.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPropCollection.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00033 #ifndef __vtkPropC_h 00034 #define __vtkPropC_h 00035 00036 #include "vtkCollection.h" 00037 00038 #include "vtkProp.h" // Needed for inline methods 00039 00040 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection 00041 { 00042 public: 00043 static vtkPropCollection *New(); 00044 vtkTypeRevisionMacro(vtkPropCollection,vtkCollection); 00045 00047 void AddItem(vtkProp *a); 00048 00050 vtkProp *GetNextProp(); 00051 00053 vtkProp *GetLastProp(); 00054 00059 int GetNumberOfPaths(); 00060 00061 protected: 00062 vtkPropCollection() {}; 00063 ~vtkPropCollection() {}; 00064 00065 00066 private: 00067 // hide the standard AddItem from the user and the compiler. 00068 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); }; 00069 00070 private: 00071 vtkPropCollection(const vtkPropCollection&); // Not implemented. 00072 void operator=(const vtkPropCollection&); // Not implemented. 00073 }; 00074 00075 inline void vtkPropCollection::AddItem(vtkProp *a) 00076 { 00077 this->vtkCollection::AddItem((vtkObject *)a); 00078 } 00079 00080 inline vtkProp *vtkPropCollection::GetNextProp() 00081 { 00082 return static_cast<vtkProp *>(this->GetNextItemAsObject()); 00083 } 00084 00085 inline vtkProp *vtkPropCollection::GetLastProp() 00086 { 00087 if ( this->Bottom == NULL ) 00088 { 00089 return NULL; 00090 } 00091 else 00092 { 00093 return static_cast<vtkProp *>(this->Bottom->Item); 00094 } 00095 } 00096 00097 #endif 00098 00099 00100 00101 00102