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);
42 
44 
45  virtual void SetCollection(vtkCollection*);
48 
50  void InitTraversal() { this->GoToFirstItem(); }
51 
53  void GoToFirstItem();
54 
56  void GoToNextItem();
57 
61 
65 
66 protected:
69 
70  // The collection over which we are iterating.
72 
73  // The current iterator position.
75 
77 private:
78  vtkCollectionIterator(const vtkCollectionIterator&); // Not implemented
79  void operator=(const vtkCollectionIterator&); // Not implemented
80 };
81 
82 #endif
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
VTKCOMMONCORE_EXPORT
#define VTKCOMMONCORE_EXPORT
Definition: vtkCommonCoreModule.h:15
vtkCollectionIterator::IsDoneWithTraversal
int IsDoneWithTraversal()
vtkCollectionIterator::SetCollection
virtual void SetCollection(vtkCollection *)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkCollectionIterator::GoToFirstItem
void GoToFirstItem()
vtkCollectionIterator::vtkCollectionIterator
vtkCollectionIterator()
vtkCollectionIterator::~vtkCollectionIterator
~vtkCollectionIterator()
vtkCollection
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:53
vtkCollectionIterator::InitTraversal
void InitTraversal()
Definition: vtkCollectionIterator.h:50
vtkCommonCoreModule.h
vtkCollectionIterator
iterator through a vtkCollection.
Definition: vtkCollectionIterator.h:37
vtkCollectionIterator::Element
vtkCollectionElement * Element
Definition: vtkCollectionIterator.h:74
vtkCollectionIterator::Collection
vtkCollection * Collection
Definition: vtkCollectionIterator.h:71
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCollectionIterator::GetCurrentObject
vtkObject * GetCurrentObject()
vtkCollectionIterator::GoToNextItem
void GoToNextItem()
vtkObject.h
vtkCollectionIterator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCollectionIterator::New
static vtkCollectionIterator * New()
vtkCollectionIterator::GetObjectInternal
vtkObject * GetObjectInternal()
vtkCollectionElement
Definition: vtkCollection.h:41