VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/Core/vtkPropCollection.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPropCollection.h
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 =========================================================================*/
00032 #ifndef vtkPropCollection_h
00033 #define vtkPropCollection_h
00034 
00035 #include "vtkRenderingCoreModule.h" // For export macro
00036 #include "vtkCollection.h"
00037 
00038 #include "vtkProp.h" // Needed for inline methods
00039 
00040 class VTKRENDERINGCORE_EXPORT vtkPropCollection : public vtkCollection
00041 {
00042  public:
00043   static vtkPropCollection *New();
00044   vtkTypeMacro(vtkPropCollection,vtkCollection);
00045 
00047   void AddItem(vtkProp *a);
00048 
00050   vtkProp *GetNextProp();
00051 
00053   vtkProp *GetLastProp();
00054 
00059   int GetNumberOfPaths();
00060 
00061   //BTX
00063 
00065   vtkProp *GetNextProp(vtkCollectionSimpleIterator &cookie) {
00066     return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
00067   //ETX
00069 
00070 protected:
00071   vtkPropCollection() {}
00072   ~vtkPropCollection() {}
00073 
00074 
00075 private:
00076   // hide the standard AddItem from the user and the compiler.
00077   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00078 
00079 private:
00080   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
00081   void operator=(const vtkPropCollection&);  // Not implemented.
00082 };
00083 
00084 inline void vtkPropCollection::AddItem(vtkProp *a)
00085 {
00086   this->vtkCollection::AddItem(a);
00087 }
00088 
00089 inline vtkProp *vtkPropCollection::GetNextProp()
00090 {
00091   return static_cast<vtkProp *>(this->GetNextItemAsObject());
00092 }
00093 
00094 inline vtkProp *vtkPropCollection::GetLastProp()
00095 {
00096   if ( this->Bottom == NULL )
00097     {
00098     return NULL;
00099     }
00100   else
00101     {
00102     return static_cast<vtkProp *>(this->Bottom->Item);
00103     }
00104 }
00105 
00106 #endif
00107 
00108 
00109 
00110 
00111 
00112 // VTK-HeaderTest-Exclude: vtkPropCollection.h