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

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 __vtkPropC_h
00030 #define __vtkPropC_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 protected:
00058   vtkPropCollection() {};
00059   ~vtkPropCollection() {};
00060   
00061 
00062 private:
00063   // hide the standard AddItem from the user and the compiler.
00064   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00065 
00066 private:
00067   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
00068   void operator=(const vtkPropCollection&);  // Not implemented.
00069 };
00070 
00071 inline void vtkPropCollection::AddItem(vtkProp *a) 
00072 {
00073   this->vtkCollection::AddItem((vtkObject *)a);
00074 }
00075 
00076 inline vtkProp *vtkPropCollection::GetNextProp() 
00077 { 
00078   return static_cast<vtkProp *>(this->GetNextItemAsObject());
00079 }
00080 
00081 inline vtkProp *vtkPropCollection::GetLastProp() 
00082 { 
00083   if ( this->Bottom == NULL )
00084     {
00085     return NULL;
00086     }
00087   else
00088     {
00089     return static_cast<vtkProp *>(this->Bottom->Item);
00090     }
00091 }
00092 
00093 #endif
00094 
00095 
00096 
00097 
00098