• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Common/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 =========================================================================*/
00029 #ifndef __vtkPropCollection_h
00030 #define __vtkPropCollection_h
00031 
00032 #include "vtkCollection.h"
00033 
00034 #include "vtkProp.h" // Needed for inline methods
00035 
00036 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
00037 {
00038  public:
00039   static vtkPropCollection *New();
00040   vtkTypeRevisionMacro(vtkPropCollection,vtkCollection);
00041 
00043   void AddItem(vtkProp *a);
00044 
00046   vtkProp *GetNextProp();
00047 
00049   vtkProp *GetLastProp();
00050   
00055   int GetNumberOfPaths();
00056   
00057   //BTX
00059 
00061   vtkProp *GetNextProp(vtkCollectionSimpleIterator &cookie) {
00062     return static_cast<vtkProp *>(this->GetNextItemAsObject(cookie));};
00063   //ETX
00065 
00066 protected:
00067   vtkPropCollection() {};
00068   ~vtkPropCollection() {};
00069   
00070 
00071 private:
00072   // hide the standard AddItem from the user and the compiler.
00073   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00074 
00075 private:
00076   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
00077   void operator=(const vtkPropCollection&);  // Not implemented.
00078 };
00079 
00080 inline void vtkPropCollection::AddItem(vtkProp *a) 
00081 {
00082   this->vtkCollection::AddItem(a);
00083 }
00084 
00085 inline vtkProp *vtkPropCollection::GetNextProp() 
00086 { 
00087   return static_cast<vtkProp *>(this->GetNextItemAsObject());
00088 }
00089 
00090 inline vtkProp *vtkPropCollection::GetLastProp() 
00091 { 
00092   if ( this->Bottom == NULL )
00093     {
00094     return NULL;
00095     }
00096   else
00097     {
00098     return static_cast<vtkProp *>(this->Bottom->Item);
00099     }
00100 }
00101 
00102 #endif
00103 
00104 
00105 
00106 
00107 

Generated by  doxygen 1.7.1