ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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
41 {
42 if (this != &iter)
43 {
45 m_Begin = iter.m_Begin;
46 m_End = iter.m_End;
47 }
48 return *this;
49 }
50
51 [[nodiscard]] const DataObject *
53 {
54 return m_Iterator->second;
55 }
56
57 [[nodiscard]] const DataObjectIdentifierType &
58 GetName() const
59 {
60 return m_Iterator->first;
61 }
62
65 {
66 const DataObjectConstIterator tmp = *this;
67 ++(*this);
68 return tmp;
69 }
70
73 {
74 ++m_Iterator;
75 return *this;
76 }
77
78 bool
80 {
81 return m_Iterator == iter.m_Iterator && m_Begin == iter.m_Begin && m_End == iter.m_End;
82 }
83
85
86 void
88 {
90 }
91
92 [[nodiscard]] bool
93 IsAtEnd() const
94 {
95 return m_Iterator == m_End;
96 }
97
98protected:
99 using InternalIteratorType = ProcessObject::DataObjectPointerMap::const_iterator;
103};
104} // namespace itk
105#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
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(DataObjectConstIterator)
DataObjectConstIterator(const DataObjectConstIterator &iter)=default
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....