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

vtkPropCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPropCollection.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 =========================================================================*/
00045 #ifndef __vtkPropC_h
00046 #define __vtkPropC_h
00047 
00048 #include "vtkCollection.h"
00049 
00050 #include "vtkProp.h" // Needed for inline methods
00051 
00052 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
00053 {
00054  public:
00055   static vtkPropCollection *New();
00056   vtkTypeRevisionMacro(vtkPropCollection,vtkCollection);
00057 
00059   void AddItem(vtkProp *a);
00060 
00062   vtkProp *GetNextProp();
00063 
00065   vtkProp *GetLastProp();
00066   
00071   int GetNumberOfPaths();
00072   
00073   //BTX
00075 
00077   vtkProp *GetNextProp(vtkCollectionSimpleIterator &cookie) {
00078     return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
00079   //ETX
00081 
00082 protected:
00083   vtkPropCollection() {};
00084   ~vtkPropCollection() {};
00085   
00086 
00087 private:
00088   // hide the standard AddItem from the user and the compiler.
00089   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00090 
00091 private:
00092   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
00093   void operator=(const vtkPropCollection&);  // Not implemented.
00094 };
00095 
00096 inline void vtkPropCollection::AddItem(vtkProp *a) 
00097 {
00098   this->vtkCollection::AddItem((vtkObject *)a);
00099 }
00100 
00101 inline vtkProp *vtkPropCollection::GetNextProp() 
00102 { 
00103   return static_cast<vtkProp *>(this->GetNextItemAsObject());
00104 }
00105 
00106 inline vtkProp *vtkPropCollection::GetLastProp() 
00107 { 
00108   if ( this->Bottom == NULL )
00109     {
00110     return NULL;
00111     }
00112   else
00113     {
00114     return static_cast<vtkProp *>(this->Bottom->Item);
00115     }
00116 }
00117 
00118 #endif
00119 
00120 
00121 
00122 
00123