18 #ifndef itkRootTreeIterator_h
19 #define itkRootTreeIterator_h
25 template<
typename TTreeType >
61 template<
typename TTreeType >
69 this->
m_Root = tree->GetRoot();
75 template<
typename TTreeType >
83 template<
typename TTreeType >
87 if ( const_cast< TreeNodeType * >( FindNextNode() ) !=
nullptr )
96 template<
typename TTreeType >
100 this->m_Position =
const_cast< TreeNodeType *
>( FindNextNode() );
101 return this->m_Position->Get();
106 template<
typename TTreeType >
110 if ( this->m_Position ==
nullptr )
114 if ( this->m_Position == this->m_Root )
118 return this->m_Position->GetParent();
123 template<
typename TTreeType >
typename Superclass::TreeNodeType TreeNodeType
Represents a node in a tree.
typename Superclass::NodeType NodeType
typename TTreeType::ValueType ValueType
RootTreeIterator(TreeType *tree, const TreeNodeType *start=nullptr)
NodeType GetType() const override
const TreeNodeType * FindNextNode() const
This class provides the base implementation for tree iterators.
typename TTreeType::TreeNodeType TreeNodeType
TreeNodeType * m_Position
bool HasNext() const override
const TreeNodeType * m_Root
const ValueType & Next() override
TreeIteratorBase< TTreeType > * Clone() override