ITK  6.0.0
Insight Toolkit
itkDataObjectConstIterator.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkDataObjectConstIterator_h
19#define itkDataObjectConstIterator_h
20
21#include "itkProcessObject.h"
22
23namespace itk
24{
31{
32public:
34
36
38 {
40 m_Begin = iter.m_Begin;
41 m_End = iter.m_End;
42 }
43
46 {
47 if (this != &iter)
48 {
50 m_Begin = iter.m_Begin;
51 m_End = iter.m_End;
52 }
53 return *this;
54 }
55
56 const DataObject *
58 {
59 return m_Iterator->second;
60 }
61
63 GetName() const
64 {
65 return m_Iterator->first;
66 }
67
70 {
71 DataObjectConstIterator tmp = *this;
72 ++(*this);
73 return tmp;
74 }
75
78 {
79 ++m_Iterator;
80 return *this;
81 }
82
83 bool
85 {
86 return m_Iterator == iter.m_Iterator && m_Begin == iter.m_Begin && m_End == iter.m_End;
87 }
88
90
91 void
93 {
95 }
96
97 bool
98 IsAtEnd() const
99 {
100 return m_Iterator == m_End;
101 }
102
103protected:
104 using InternalIteratorType = ProcessObject::DataObjectPointerMap::const_iterator;
108};
109} // namespace itk
110#endif
A forward iterator over the DataObject of a ProcessObject.
const DataObject * GetDataObject() const
ProcessObject::DataObjectPointerMap::const_iterator InternalIteratorType
bool operator==(const DataObjectConstIterator &iter) const
DataObject::DataObjectIdentifierType DataObjectIdentifierType
DataObjectConstIterator(const DataObjectConstIterator &iter)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(DataObjectConstIterator)
const DataObjectIdentifierType & GetName() const
DataObjectConstIterator & operator=(const DataObjectConstIterator &iter)
DataObjectConstIterator & operator++()
DataObjectConstIterator operator++(int)
Base class for all data objects in ITK.
std::string DataObjectIdentifierType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....