#include <itkPostOrderTreeIterator.h>
Inheritance diagram for itk::PostOrderTreeIterator< TTreeType >:
Definition at line 25 of file itkPostOrderTreeIterator.h.
TreeIteratorBase< TTreeType > * | Clone () |
const TreeNodeType * | FindMostRightLeaf (TreeNodeType *node) const |
const TreeNodeType * | FindNextNode () const |
const TreeNodeType * | FindSister (TreeNodeType *node) const |
Public Types | |
enum | { UNDEFIND = 0, PREORDER = 1, INORDER = 2, POSTORDER = 3, LEVELORDER = 4, CHILD = 5, ROOT = 6, LEAF = 7 } |
typedef PostOrderTreeIterator | Self |
typedef TreeIteratorBase< TTreeType > | Superclass |
typedef Superclass::TreeNodeType | TreeNodeType |
typedef TTreeType | TreeType |
typedef TTreeType::ValueType | ValueType |
Public Member Functions | |
virtual bool | Add (TTreeType &subTree) |
virtual bool | Add (int position, ValueType element) |
virtual bool | Add (ValueType element) |
virtual int | ChildPosition (ValueType element) const |
virtual TreeIteratorBase< TTreeType > * | Children () |
virtual int | Count () |
virtual int | CountChildren () const |
virtual bool | Disconnect () |
virtual const ValueType & | Get () const |
virtual TreeIteratorBase< TTreeType > * | GetChild (int number) const |
const TreeNodeType * | GetParent () const |
virtual TTreeType * | GetSubTree () const |
TTreeType * | GetTree () const |
int | GetType () const |
void | GoToBegin () |
virtual bool | GoToChild (int number=0) |
void | GoToEnd () |
virtual bool | GoToParent () |
virtual bool | HasChild (int number=0) const |
virtual bool | HasParent () const |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
virtual bool | IsLeaf () const |
virtual bool | IsRoot () const |
virtual TreeIteratorBase< TTreeType > * | Parents () |
PostOrderTreeIterator (TreeType *tree) | |
bool | Remove () |
virtual bool | RemoveChild (int number) |
ValueType | Set (ValueType element) |
virtual const TreeNodeType * | GetNode () const |
virtual TreeNodeType * | GetNode () |
const TreeNodeType * | GetRoot () const |
TreeNodeType * | GetRoot () |
Self & | operator++ () |
Protected Member Functions | |
bool | HasNext () const |
const ValueType & | Next () |
Protected Attributes | |
TreeNodeType * | m_Begin |
TreeNodeType * | m_End |
TreeNodeType * | m_Position |
const TreeNodeType * | m_Root |
TTreeType * | m_Tree |
typedef PostOrderTreeIterator itk::PostOrderTreeIterator< TTreeType >::Self |
Typedefs
Reimplemented from itk::TreeIteratorBase< TTreeType >.
Definition at line 30 of file itkPostOrderTreeIterator.h.
typedef TreeIteratorBase<TTreeType> itk::PostOrderTreeIterator< TTreeType >::Superclass |
Definition at line 31 of file itkPostOrderTreeIterator.h.
typedef Superclass::TreeNodeType itk::PostOrderTreeIterator< TTreeType >::TreeNodeType |
Reimplemented from itk::TreeIteratorBase< TTreeType >.
Definition at line 34 of file itkPostOrderTreeIterator.h.
typedef TTreeType itk::PostOrderTreeIterator< TTreeType >::TreeType |
Definition at line 32 of file itkPostOrderTreeIterator.h.
typedef TTreeType::ValueType itk::PostOrderTreeIterator< TTreeType >::ValueType |
Reimplemented from itk::TreeIteratorBase< TTreeType >.
Definition at line 33 of file itkPostOrderTreeIterator.h.
anonymous enum [inherited] |
Enumerations
Definition at line 149 of file itkTreeIteratorBase.h.
itk::PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator | ( | TreeType * | tree | ) |
Constructor
Definition at line 62 of file itkPostOrderTreeIterator.h.
References itk::PostOrderTreeIterator< TTreeType >::FindMostRightLeaf(), itk::TreeIteratorBase< TTreeType >::m_Begin, itk::TreeIteratorBase< TTreeType >::m_Position, and NULL.
virtual bool itk::TreeIteratorBase< TTreeType >::Add | ( | TTreeType & | subTree | ) | [virtual, inherited] |
Add a subtree
virtual bool itk::TreeIteratorBase< TTreeType >::Add | ( | int | position, | |
ValueType | element | |||
) | [virtual, inherited] |
Add an element at a given position
virtual bool itk::TreeIteratorBase< TTreeType >::Add | ( | ValueType | element | ) | [virtual, inherited] |
Add an element to the tree
virtual int itk::TreeIteratorBase< TTreeType >::ChildPosition | ( | ValueType | element | ) | const [virtual, inherited] |
Return the current ChildPosition of an element
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::Children | ( | ) | [virtual, inherited] |
Return a list of children
TreeIteratorBase< TTreeType > * itk::PostOrderTreeIterator< TTreeType >::Clone | ( | ) | [virtual] |
Clone function
Implements itk::TreeIteratorBase< TTreeType >.
Definition at line 188 of file itkPostOrderTreeIterator.h.
References itk::TreeIteratorBase< TTreeType >::m_Tree.
virtual int itk::TreeIteratorBase< TTreeType >::Count | ( | ) | [virtual, inherited] |
Count the number of nodes
virtual int itk::TreeIteratorBase< TTreeType >::CountChildren | ( | ) | const [virtual, inherited] |
Count the number of children
Referenced by itk::ChildTreeIterator< TTreeType >::HasNext().
virtual bool itk::TreeIteratorBase< TTreeType >::Disconnect | ( | ) | [virtual, inherited] |
Disconnect the tree
const PostOrderTreeIterator< TTreeType >::TreeNodeType * itk::PostOrderTreeIterator< TTreeType >::FindMostRightLeaf | ( | TreeNodeType * | node | ) | const [protected] |
Find the most right leaf
Definition at line 162 of file itkPostOrderTreeIterator.h.
References NULL.
Referenced by itk::PostOrderTreeIterator< TTreeType >::FindNextNode(), and itk::PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator().
const PostOrderTreeIterator< TTreeType >::TreeNodeType * itk::PostOrderTreeIterator< TTreeType >::FindNextNode | ( | ) | const [protected] |
Find the next node
Definition at line 114 of file itkPostOrderTreeIterator.h.
References itk::PostOrderTreeIterator< TTreeType >::FindMostRightLeaf(), itk::PostOrderTreeIterator< TTreeType >::FindSister(), itk::TreeIteratorBase< TTreeType >::m_Position, and NULL.
Referenced by itk::PostOrderTreeIterator< TTreeType >::HasNext(), and itk::PostOrderTreeIterator< TTreeType >::Next().
const PostOrderTreeIterator< TTreeType >::TreeNodeType * itk::PostOrderTreeIterator< TTreeType >::FindSister | ( | TreeNodeType * | node | ) | const [protected] |
Find the sister node
Definition at line 135 of file itkPostOrderTreeIterator.h.
References NULL.
Referenced by itk::PostOrderTreeIterator< TTreeType >::FindNextNode().
virtual const ValueType& itk::TreeIteratorBase< TTreeType >::Get | ( | ) | const [virtual, inherited] |
Get a value
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::GetChild | ( | int | number | ) | const [virtual, inherited] |
Return a list of child
virtual const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetNode | ( | ) | const [virtual, inherited] |
virtual TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetNode | ( | ) | [virtual, inherited] |
Get the current node
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetParent | ( | ) | const [inherited] |
Return the first parent found
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetRoot | ( | ) | const [inherited] |
TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetRoot | ( | ) | [inherited] |
Get the root
virtual TTreeType* itk::TreeIteratorBase< TTreeType >::GetSubTree | ( | ) | const [virtual, inherited] |
Get the subtree
TTreeType* itk::TreeIteratorBase< TTreeType >::GetTree | ( | ) | const [inherited] |
Get the tree
int itk::PostOrderTreeIterator< TTreeType >::GetType | ( | ) | const [virtual] |
Get the type of the iterator
Implements itk::TreeIteratorBase< TTreeType >.
Definition at line 82 of file itkPostOrderTreeIterator.h.
void itk::TreeIteratorBase< TTreeType >::GoToBegin | ( | void | ) | [inline, inherited] |
Move an iterator to the beginning of the tree
Definition at line 122 of file itkTreeIteratorBase.h.
References itk::TreeIteratorBase< TTreeType >::m_Begin, and itk::TreeIteratorBase< TTreeType >::m_Position.
virtual bool itk::TreeIteratorBase< TTreeType >::GoToChild | ( | int | number = 0 |
) | [virtual, inherited] |
Go to the specified child
Reimplemented in itk::ChildTreeIterator< TTreeType >.
void itk::TreeIteratorBase< TTreeType >::GoToEnd | ( | void | ) | [inline, inherited] |
Move an iterator to the end of the tree.
Definition at line 128 of file itkTreeIteratorBase.h.
References itk::TreeIteratorBase< TTreeType >::m_End, and itk::TreeIteratorBase< TTreeType >::m_Position.
virtual bool itk::TreeIteratorBase< TTreeType >::GoToParent | ( | ) | [virtual, inherited] |
Go to the parent
Reimplemented in itk::ChildTreeIterator< TTreeType >.
virtual bool itk::TreeIteratorBase< TTreeType >::HasChild | ( | int | number = 0 |
) | const [virtual, inherited] |
Return true if the current node has a child
bool itk::PostOrderTreeIterator< TTreeType >::HasNext | ( | ) | const [protected, virtual] |
Return true if the next node exists
Implements itk::TreeIteratorBase< TTreeType >.
Definition at line 91 of file itkPostOrderTreeIterator.h.
References itk::PostOrderTreeIterator< TTreeType >::FindNextNode(), and NULL.
virtual bool itk::TreeIteratorBase< TTreeType >::HasParent | ( | ) | const [virtual, inherited] |
Return true if the current node has a parent
bool itk::TreeIteratorBase< TTreeType >::IsAtBegin | ( | void | ) | const [inline, inherited] |
Is the iterator at the beginning of the tree?
Definition at line 134 of file itkTreeIteratorBase.h.
References itk::TreeIteratorBase< TTreeType >::m_Begin, and itk::TreeIteratorBase< TTreeType >::m_Position.
bool itk::TreeIteratorBase< TTreeType >::IsAtEnd | ( | void | ) | const [inline, inherited] |
Is the iterator at the end of the tree?. The iterator is at the end if it points to NULL
Definition at line 140 of file itkTreeIteratorBase.h.
References itk::TreeIteratorBase< TTreeType >::m_End, and itk::TreeIteratorBase< TTreeType >::m_Position.
virtual bool itk::TreeIteratorBase< TTreeType >::IsLeaf | ( | ) | const [virtual, inherited] |
Return true if the current node is a leaf
virtual bool itk::TreeIteratorBase< TTreeType >::IsRoot | ( | ) | const [virtual, inherited] |
Return true if the current node is a root
const PostOrderTreeIterator< TTreeType >::ValueType & itk::PostOrderTreeIterator< TTreeType >::Next | ( | ) | [protected, virtual] |
Return the next node
Implements itk::TreeIteratorBase< TTreeType >.
Definition at line 104 of file itkPostOrderTreeIterator.h.
References itk::PostOrderTreeIterator< TTreeType >::FindNextNode(), and itk::TreeIteratorBase< TTreeType >::m_Position.
Self& itk::TreeIteratorBase< TTreeType >::operator++ | ( | ) | [inline, inherited] |
operator++
Definition at line 162 of file itkTreeIteratorBase.h.
References itk::TreeIteratorBase< TTreeType >::Next().
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::Parents | ( | ) | [virtual, inherited] |
Return a list of parents
bool itk::TreeIteratorBase< TTreeType >::Remove | ( | ) | [inherited] |
Remove the current node from the tree
virtual bool itk::TreeIteratorBase< TTreeType >::RemoveChild | ( | int | number | ) | [virtual, inherited] |
Remove a child
ValueType itk::TreeIteratorBase< TTreeType >::Set | ( | ValueType | element | ) | [inherited] |
Set the current value of the node
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Begin [mutable, protected, inherited] |
Definition at line 189 of file itkTreeIteratorBase.h.
Referenced by itk::ChildTreeIterator< TTreeType >::ChildTreeIterator(), itk::TreeIteratorBase< TTreeType >::GoToBegin(), itk::ChildTreeIterator< TTreeType >::GoToChild(), itk::ChildTreeIterator< TTreeType >::GoToParent(), itk::TreeIteratorBase< TTreeType >::IsAtBegin(), itk::LeafTreeIterator< TTreeType >::LeafTreeIterator(), itk::TreeIteratorBase< TTreeType >::operator=(), itk::PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator(), and itk::RootTreeIterator< TTreeType >::RootTreeIterator().
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_End [mutable, protected, inherited] |
Definition at line 190 of file itkTreeIteratorBase.h.
Referenced by itk::TreeIteratorBase< TTreeType >::GoToEnd(), itk::TreeIteratorBase< TTreeType >::IsAtEnd(), and itk::TreeIteratorBase< TTreeType >::operator=().
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Position [mutable, protected, inherited] |
Definition at line 188 of file itkTreeIteratorBase.h.
Referenced by itk::ChildTreeIterator< TTreeType >::ChildTreeIterator(), itk::PreOrderTreeIterator< TTreeType >::Clone(), itk::PostOrderTreeIterator< TTreeType >::FindNextNode(), itk::LevelOrderTreeIterator< TTreeType >::GetLevel(), itk::TreeIteratorBase< TTreeType >::GoToBegin(), itk::ChildTreeIterator< TTreeType >::GoToChild(), itk::TreeIteratorBase< TTreeType >::GoToEnd(), itk::ChildTreeIterator< TTreeType >::GoToParent(), itk::TreeIteratorBase< TTreeType >::IsAtBegin(), itk::TreeIteratorBase< TTreeType >::IsAtEnd(), itk::RootTreeIterator< TTreeType >::Next(), itk::PreOrderTreeIterator< TTreeType >::Next(), itk::PostOrderTreeIterator< TTreeType >::Next(), itk::LevelOrderTreeIterator< TTreeType >::Next(), itk::LeafTreeIterator< TTreeType >::Next(), itk::InOrderTreeIterator< TTreeType >::Next(), itk::ChildTreeIterator< TTreeType >::Next(), itk::TreeIteratorBase< TTreeType >::operator=(), itk::PostOrderTreeIterator< TTreeType >::PostOrderTreeIterator(), and itk::RootTreeIterator< TTreeType >::RootTreeIterator().
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Root [protected, inherited] |
Definition at line 191 of file itkTreeIteratorBase.h.
Referenced by itk::LevelOrderTreeIterator< TTreeType >::GetLevel(), itk::TreeIteratorBase< TTreeType >::operator=(), and itk::RootTreeIterator< TTreeType >::RootTreeIterator().
TTreeType* itk::TreeIteratorBase< TTreeType >::m_Tree [protected, inherited] |
Definition at line 192 of file itkTreeIteratorBase.h.
Referenced by itk::RootTreeIterator< TTreeType >::Clone(), itk::PreOrderTreeIterator< TTreeType >::Clone(), itk::PostOrderTreeIterator< TTreeType >::Clone(), itk::LevelOrderTreeIterator< TTreeType >::Clone(), itk::LeafTreeIterator< TTreeType >::Clone(), itk::ChildTreeIterator< TTreeType >::Clone(), and itk::TreeIteratorBase< TTreeType >::operator=().