Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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   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 =========================================================================*/
    00046 #ifndef __vtkPropC_h
    00047 #define __vtkPropC_h
    00048
    00049 #include "vtkCollection.h"
    00050
    00051 #include "vtkProp.h" // Needed for inline methods
    00052
    00053 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
    00054 {
    00055  public:
    00056   static vtkPropCollection *New();
    00057   vtkTypeRevisionMacro(vtkPropCollection,vtkCollection);
    00058
    00060   void AddItem(vtkProp *a);
    00061
    00063   vtkProp *GetNextProp();
    00064
    00066   vtkProp *GetLastProp();
    00067
    00072   int GetNumberOfPaths();
    00073
    00074 protected:
    00075   vtkPropCollection() {};
    00076   ~vtkPropCollection() {};
    00077
    00078
    00079 private:
    00080   // hide the standard AddItem from the user and the compiler.
    00081   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
    00082
    00083 private:
    00084   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
    00085   void operator=(const vtkPropCollection&);  // Not implemented.
    00086 };
    00087
    00088 inline void vtkPropCollection::AddItem(vtkProp *a)
    00089 {
    00090   this->vtkCollection::AddItem((vtkObject *)a);
    00091 }
    00092
    00093 inline vtkProp *vtkPropCollection::GetNextProp()
    00094 {
    00095   return static_cast<vtkProp *>(this->GetNextItemAsObject());
    00096 }
    00097
    00098 inline vtkProp *vtkPropCollection::GetLastProp()
    00099 {
    00100   if ( this->Bottom == NULL )
    00101     {
    00102     return NULL;
    00103     }
    00104   else
    00105     {
    00106     return static_cast<vtkProp *>(this->Bottom->Item);
    00107     }
    00108 }
    00109
    00110 #endif
    00111
    00112
    00113
    00114
    00115