VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/Core/vtkCollectionIterator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCollectionIterator.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 =========================================================================*/
00027 #ifndef vtkCollectionIterator_h
00028 #define vtkCollectionIterator_h
00029 
00030 #include "vtkCommonCoreModule.h" // For export macro
00031 #include "vtkObject.h"
00032 
00033 class vtkCollection;
00034 class vtkCollectionElement;
00035 
00036 class VTKCOMMONCORE_EXPORT vtkCollectionIterator : public vtkObject
00037 {
00038 public:
00039   vtkTypeMacro(vtkCollectionIterator,vtkObject);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   static vtkCollectionIterator* New();
00042 
00044 
00045   virtual void SetCollection(vtkCollection*);
00046   vtkGetObjectMacro(Collection, vtkCollection);
00048 
00050   void InitTraversal() { this->GoToFirstItem(); }
00051 
00053   void GoToFirstItem();
00054 
00056   void GoToNextItem();
00057 
00060   int IsDoneWithTraversal();
00061 
00064   vtkObject* GetCurrentObject();
00065 
00066 protected:
00067   vtkCollectionIterator();
00068   ~vtkCollectionIterator();
00069 
00070   // The collection over which we are iterating.
00071   vtkCollection* Collection;
00072 
00073   // The current iterator position.
00074   vtkCollectionElement* Element;
00075 
00076   vtkObject* GetObjectInternal();
00077 private:
00078   vtkCollectionIterator(const vtkCollectionIterator&); // Not implemented
00079   void operator=(const vtkCollectionIterator&); // Not implemented
00080 };
00081 
00082 #endif