Common/vtkCollectionIterator.h Source File

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

# Common/vtkCollectionIterator.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkCollectionIterator.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 =========================================================================*/
    00041 #ifndef __vtkCollectionIterator_h
    00042 #define __vtkCollectionIterator_h
    00043
    00044 #include "vtkObject.h"
    00045
    00046 class vtkCollection;
    00047 class vtkCollectionElement;
    00048
    00049 class VTK_COMMON_EXPORT vtkCollectionIterator : public vtkObject
    00050 {
    00051 public:
    00052   vtkTypeRevisionMacro(vtkCollectionIterator,vtkObject);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054   static vtkCollectionIterator* New();
    00055
    00057
    00058   virtual void SetCollection(vtkCollection*);
    00059   vtkGetObjectMacro(Collection, vtkCollection);
    00061
    00063   void InitTraversal() { this->GoToFirstItem(); }
    00064
    00066   void GoToFirstItem();
    00067
    00069   void GoToNextItem();
    00070
    00073   int IsDoneWithTraversal();
    00074
    00077   vtkObject* GetObject();
    00078
    00079 protected:
    00080   vtkCollectionIterator();
    00081   ~vtkCollectionIterator();
    00082
    00083   // The collection over which we are iterating.
    00084   vtkCollection* Collection;
    00085
    00086   // The current iterator position.
    00087   vtkCollectionElement* Element;
    00088
    00089 private:
    00090   vtkCollectionIterator(const vtkCollectionIterator&); // Not implemented
    00091   void operator=(const vtkCollectionIterator&); // Not implemented
    00092 };
    00093
    00094 #endif