VTK
dox
Common
Core
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
=========================================================================*/
28
#ifndef vtkCollectionIterator_h
29
#define vtkCollectionIterator_h
30
31
#include "vtkCommonCoreModule.h"
// For export macro
32
#include "
vtkObject.h
"
33
34
class
vtkCollection
;
35
class
vtkCollectionElement
;
36
37
class
VTKCOMMONCORE_EXPORT
vtkCollectionIterator
:
public
vtkObject
38
{
39
public
:
40
vtkTypeMacro(
vtkCollectionIterator
,
vtkObject
);
41
void
PrintSelf
(ostream& os,
vtkIndent
indent) VTK_OVERRIDE;
42
static
vtkCollectionIterator
*
New
();
43
45
48
virtual
void
SetCollection(
vtkCollection
*);
49
vtkGetObjectMacro(Collection,
vtkCollection
);
51
55
void
InitTraversal
() { this->GoToFirstItem(); }
56
60
void
GoToFirstItem();
61
65
void
GoToNextItem();
66
71
int
IsDoneWithTraversal();
72
77
vtkObject
* GetCurrentObject();
78
79
protected
:
80
vtkCollectionIterator
();
81
~
vtkCollectionIterator
() VTK_OVERRIDE;
82
83
// The collection over which we are iterating.
84
vtkCollection
* Collection;
85
86
// The current iterator position.
87
vtkCollectionElement
* Element;
88
89
vtkObject
* GetObjectInternal();
90
private:
91
vtkCollectionIterator
(const
vtkCollectionIterator
&) VTK_DELETE_FUNCTION;
92
void
operator=(const
vtkCollectionIterator
&) VTK_DELETE_FUNCTION;
93
};
94
95
#endif
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:59
vtkCollection
create and manipulate unsorted lists of objects
Definition:
vtkCollection.h:51
vtkCollectionIterator::InitTraversal
void InitTraversal()
Position the iterator at the first item in the collection.
Definition:
vtkCollectionIterator.h:55
vtkCollectionIterator
iterator through a vtkCollection.
Definition:
vtkCollectionIterator.h:37
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkCollectionElement
Definition:
vtkCollection.h:40
Generated by
1.8.16