VTK
vtkCollectionIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCollectionIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
27 #ifndef vtkCollectionIterator_h
28 #define vtkCollectionIterator_h
29 
30 #include "vtkCommonCoreModule.h" // For export macro
31 #include "vtkObject.h"
32 
33 class vtkCollection;
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41  static vtkCollectionIterator* New();
42 
44 
45  virtual void SetCollection(vtkCollection*);
46  vtkGetObjectMacro(Collection, vtkCollection);
48 
50  void InitTraversal() { this->GoToFirstItem(); }
51 
53  void GoToFirstItem();
54 
56  void GoToNextItem();
57 
60  int IsDoneWithTraversal();
61 
64  vtkObject* GetCurrentObject();
65 
66 protected:
69 
70  // The collection over which we are iterating.
72 
73  // The current iterator position.
75 
76  vtkObject* GetObjectInternal();
77 private:
78  vtkCollectionIterator(const vtkCollectionIterator&); // Not implemented
79  void operator=(const vtkCollectionIterator&); // Not implemented
80 };
81 
82 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define VTKCOMMONCORE_EXPORT
vtkCollectionElement * Element
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
iterator through a vtkCollection.
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
static vtkObject * New()