#include <itkTreeIteratorBase.h>
Inheritance diagram for itk::TreeIteratorBase< TTreeType >:
Public Types | |
typedef TreeIteratorBase< TTreeType > | Self |
typedef TTreeType::ValueType | ValueType |
typedef TTreeType::TreeNodeType | TreeNodeType |
enum | { UNDEFIND = 0, PREORDER = 1, INORDER = 2, POSTORDER = 3, LEVELORDER = 4, CHILD = 5, ROOT = 6, LEAF = 7 } |
Public Member Functions | |
virtual bool | Add (ValueType element) |
virtual bool | Add (int position, ValueType element) |
virtual bool | Add (TTreeType &subTree) |
virtual const ValueType & | Get () const |
virtual TTreeType * | GetSubTree () const |
virtual bool | IsLeaf () const |
virtual bool | IsRoot () const |
virtual int | GetType () const=0 |
virtual bool | GoToChild (int number=0) |
virtual bool | GoToParent () |
ValueType & | Set (ValueType element) |
virtual bool | HasChild (int number=0) const |
virtual int | ChildPosition (ValueType element) const |
virtual bool | RemoveChild (int number) |
virtual int | CountChildren () const |
virtual bool | HasParent () const |
virtual bool | Disconnect () |
virtual TreeIteratorBase< TTreeType > * | Children () |
virtual TreeIteratorBase< TTreeType > * | Parents () |
virtual TreeIteratorBase< TTreeType > * | GetChild (int number) const |
virtual int | Count () |
bool | Remove () |
TTreeType * | GetTree () const |
const TreeNodeType * | GetParent () const |
void | GoToBegin () |
void | GoToEnd () |
bool | IsAtBegin (void) const |
bool | IsAtEnd (void) const |
virtual TreeIteratorBase< TTreeType > * | Clone ()=0 |
virtual Self & | operator= (Self &iterator) |
virtual TreeNodeType * | GetNode () |
virtual const TreeNodeType * | GetNode () const |
TreeNodeType *& | GetRoot () |
const TreeNodeType *& | GetRoot () const |
Self & | operator++ () |
Protected Member Functions | |
int | Count (TreeNodeType *node) |
virtual bool | HasNext () const=0 |
virtual const ValueType & | Next ()=0 |
TreeIteratorBase (TTreeType *tree, const TreeNodeType *start) | |
TreeIteratorBase (const TTreeType *tree, const TreeNodeType *start) | |
Protected Attributes | |
TreeNodeType * | m_Position |
TreeNodeType * | m_Begin |
TreeNodeType * | m_End |
const TreeNodeType * | m_Root |
TTreeType * | m_Tree |
This class provides the base implementation for tree iterators
Definition at line 30 of file itkTreeIteratorBase.h.
|
Typedefs Reimplemented in itk::ChildTreeIterator< TTreeType >, and itk::LevelOrderTreeIterator< TTreeType >. Definition at line 35 of file itkTreeIteratorBase.h. |
|
|
|
Enumerations Definition at line 149 of file itkTreeIteratorBase.h. |
|
Constructors |
|
Constructors |
|
Add a subtree |
|
Add an element at a given position |
|
Add an element to the tree |
|
Return the current ChildPosition of an element |
|
Return a list of children |
|
|
|
|
Count the number of nodes |
|
Count the number of children |
|
Disconnect the tree |
|
Get a value |
|
Return a list of child |
|
Get the current node |
|
Get the current node |
|
Return the first parent found |
|
Get the root |
|
Get the root |
|
Get the subtree |
|
Get the tree |
|
|
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. |
|
Go to the specified child Reimplemented in itk::ChildTreeIterator< TTreeType >. |
|
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. |
|
Go to the parent Reimplemented in itk::ChildTreeIterator< TTreeType >. |
|
Return true if the current node has a child |
|
|
Return true if the current node has a parent |
|
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. |
|
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. |
|
Return true if the current node is a leaf |
|
Return true if the current node is a root |
|
|
operator++ Definition at line 162 of file itkTreeIteratorBase.h. |
|
operator = Definition at line 170 of file itkTreeIteratorBase.h. References itk::TreeIteratorBase< TTreeType >::m_Begin, itk::TreeIteratorBase< TTreeType >::m_End, itk::TreeIteratorBase< TTreeType >::m_Root, and itk::TreeIteratorBase< TTreeType >::m_Tree. |
|
Return a list of parents |
|
Remove the current node from the tree |
|
Remove a child |
|
Set the current value of the node |
|
Definition at line 188 of file itkTreeIteratorBase.h. Referenced by itk::TreeIteratorBase< TTreeType >::GoToBegin(), itk::TreeIteratorBase< TTreeType >::IsAtBegin(), and itk::TreeIteratorBase< TTreeType >::operator=(). |
|
Definition at line 189 of file itkTreeIteratorBase.h. Referenced by itk::TreeIteratorBase< TTreeType >::GoToEnd(), itk::TreeIteratorBase< TTreeType >::IsAtEnd(), and itk::TreeIteratorBase< TTreeType >::operator=(). |
|
Definition at line 187 of file itkTreeIteratorBase.h. Referenced by itk::TreeIteratorBase< TTreeType >::GoToBegin(), itk::TreeIteratorBase< TTreeType >::GoToEnd(), itk::TreeIteratorBase< TTreeType >::IsAtBegin(), and itk::TreeIteratorBase< TTreeType >::IsAtEnd(). |
|
Definition at line 190 of file itkTreeIteratorBase.h. Referenced by itk::TreeIteratorBase< TTreeType >::operator=(). |
|
Definition at line 191 of file itkTreeIteratorBase.h. Referenced by itk::TreeIteratorBase< TTreeType >::operator=(). |