Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ChildTreeIterator< TTreeType > Class Template Reference

#include <itkChildTreeIterator.h>

Inheritance diagram for itk::ChildTreeIterator< TTreeType >:

Inheritance graph
[legend]
Collaboration diagram for itk::ChildTreeIterator< TTreeType >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class TTreeType>
class itk::ChildTreeIterator< TTreeType >

Definition at line 27 of file itkChildTreeIterator.h.

Public Types

enum  {
  UNDEFIND = 0,
  PREORDER = 1,
  INORDER = 2,
  POSTORDER = 3,
  LEVELORDER = 4,
  CHILD = 5,
  ROOT = 6,
  LEAF = 7
}
typedef Superclass::Self 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 ()
 ChildTreeIterator (const TreeIteratorBase< TTreeType > &iterator)
virtual int Count ()
virtual int CountChildren () const
virtual bool Disconnect ()
virtual const ValueTypeGet () const
virtual TreeIteratorBase<
TTreeType > * 
GetChild (int number) const
const TreeNodeTypeGetParent () 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 ()
bool Remove ()
virtual bool RemoveChild (int number)
ValueType Set (ValueType element)
TreeIteratorBase< TTreeType > * Clone ()
virtual const TreeNodeTypeGetNode () const
virtual TreeNodeTypeGetNode ()
const TreeNodeTypeGetRoot () const
TreeNodeTypeGetRoot ()
Selfoperator++ ()
Selfoperator= (Superclass &iterator)

Protected Member Functions

bool HasNext () const
const ValueTypeNext ()

Protected Attributes

TreeNodeTypem_Begin
TreeNodeTypem_End
TreeNodeTypem_Position
const TreeNodeTypem_Root
TTreeType * m_Tree


Member Typedef Documentation

template<class TTreeType>
typedef Superclass::Self itk::ChildTreeIterator< TTreeType >::Self

Typedefs

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 34 of file itkChildTreeIterator.h.

template<class TTreeType>
typedef TreeIteratorBase<TTreeType> itk::ChildTreeIterator< TTreeType >::Superclass

Typedefs

Definition at line 32 of file itkChildTreeIterator.h.

template<class TTreeType>
typedef Superclass::TreeNodeType itk::ChildTreeIterator< TTreeType >::TreeNodeType

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 36 of file itkChildTreeIterator.h.

template<class TTreeType>
typedef TTreeType itk::ChildTreeIterator< TTreeType >::TreeType

Definition at line 33 of file itkChildTreeIterator.h.

template<class TTreeType>
typedef TTreeType::ValueType itk::ChildTreeIterator< TTreeType >::ValueType

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 35 of file itkChildTreeIterator.h.


Member Enumeration Documentation

template<class TTreeType>
anonymous enum [inherited]

Enumerations

Enumerator:
UNDEFIND 
PREORDER 
INORDER 
POSTORDER 
LEVELORDER 
CHILD 
ROOT 
LEAF 

Definition at line 149 of file itkTreeIteratorBase.h.


Constructor & Destructor Documentation

template<class TTreeType>
itk::ChildTreeIterator< TTreeType >::ChildTreeIterator ( TreeType tree,
const TreeNodeType start = NULL 
)

Constructor

Definition at line 84 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Begin, and itk::TreeIteratorBase< TTreeType >::m_Position.

template<class TTreeType>
itk::ChildTreeIterator< TTreeType >::ChildTreeIterator ( const TreeIteratorBase< TTreeType > &  iterator  ) 

Constructor

Definition at line 96 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Position.

template<class TTreeType>
itk::ChildTreeIterator< TTreeType >::ChildTreeIterator ( TreeType tree,
const TreeNodeType start = NULL 
)

Constructor

Definition at line 84 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Begin, and itk::TreeIteratorBase< TTreeType >::m_Position.


Member Function Documentation

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::Add ( TTreeType &  subTree  )  [virtual, inherited]

Add a subtree

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::Add ( int  position,
ValueType  element 
) [virtual, inherited]

Add an element at a given position

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::Add ( ValueType  element  )  [virtual, inherited]

Add an element to the tree

template<class TTreeType>
virtual int itk::TreeIteratorBase< TTreeType >::ChildPosition ( ValueType  element  )  const [virtual, inherited]

Return the current ChildPosition of an element

template<class TTreeType>
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::Children (  )  [virtual, inherited]

Return a list of children

template<class TTreeType>
TreeIteratorBase< TTreeType > * itk::ChildTreeIterator< TTreeType >::Clone (  )  [virtual]

Clone function

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 178 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Tree.

template<class TTreeType>
virtual int itk::TreeIteratorBase< TTreeType >::Count (  )  [virtual, inherited]

Count the number of nodes

template<class TTreeType>
virtual int itk::TreeIteratorBase< TTreeType >::CountChildren (  )  const [virtual, inherited]

Count the number of children

Referenced by itk::ChildTreeIterator< TTreeType >::HasNext().

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::Disconnect (  )  [virtual, inherited]

Disconnect the tree

template<class TTreeType>
virtual const ValueType& itk::TreeIteratorBase< TTreeType >::Get (  )  const [virtual, inherited]

Get a value

template<class TTreeType>
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::GetChild ( int  number  )  const [virtual, inherited]

Return a list of child

template<class TTreeType>
virtual const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetNode (  )  const [virtual, inherited]

template<class TTreeType>
virtual TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetNode (  )  [virtual, inherited]

Get the current node

template<class TTreeType>
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetParent (  )  const [inherited]

Return the first parent found

template<class TTreeType>
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetRoot (  )  const [inherited]

template<class TTreeType>
TreeNodeType* itk::TreeIteratorBase< TTreeType >::GetRoot (  )  [inherited]

Get the root

template<class TTreeType>
virtual TTreeType* itk::TreeIteratorBase< TTreeType >::GetSubTree (  )  const [virtual, inherited]

Get the subtree

template<class TTreeType>
TTreeType* itk::TreeIteratorBase< TTreeType >::GetTree (  )  const [inherited]

Get the tree

template<class TTreeType>
int itk::ChildTreeIterator< TTreeType >::GetType (  )  const [virtual]

Get the type of the iterator

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 144 of file itkChildTreeIterator.h.

template<class TTreeType>
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.

template<class TTreeType>
bool itk::ChildTreeIterator< TTreeType >::GoToChild ( int  number = 0  )  [virtual]

Go to a specific child node

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 108 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Begin, itk::TreeIteratorBase< TTreeType >::m_Position, and NULL.

template<class 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.

template<class TTreeType>
bool itk::ChildTreeIterator< TTreeType >::GoToParent (  )  [virtual]

Go to a parent node

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 125 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Begin, itk::TreeIteratorBase< TTreeType >::m_Position, and NULL.

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::HasChild ( int  number = 0  )  const [virtual, inherited]

Return true if the current node has a child

template<class TTreeType>
bool itk::ChildTreeIterator< TTreeType >::HasNext (  )  const [protected, virtual]

Return true if the next value exists

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 152 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::CountChildren().

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::HasParent (  )  const [virtual, inherited]

Return true if the current node has a parent

template<class TTreeType>
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.

template<class TTreeType>
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.

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::IsLeaf (  )  const [virtual, inherited]

Return true if the current node is a leaf

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::IsRoot (  )  const [virtual, inherited]

Return true if the current node is a root

template<class TTreeType>
const ChildTreeIterator< TTreeType >::ValueType & itk::ChildTreeIterator< TTreeType >::Next (  )  [protected, virtual]

Get the next value

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 168 of file itkChildTreeIterator.h.

References itk::TreeIteratorBase< TTreeType >::m_Position.

template<class TTreeType>
Self& itk::TreeIteratorBase< TTreeType >::operator++ (  )  [inline, inherited]

operator++

Definition at line 162 of file itkTreeIteratorBase.h.

References itk::TreeIteratorBase< TTreeType >::Next().

template<class TTreeType>
Self& itk::ChildTreeIterator< TTreeType >::operator= ( Superclass iterator  )  [inline]

operator =

Definition at line 57 of file itkChildTreeIterator.h.

References itk::ChildTreeIterator< TTreeType >::m_ListPosition, itk::ChildTreeIterator< TTreeType >::m_ParentNode, and itk::TreeIteratorBase< TTreeType >::operator=().

template<class TTreeType>
virtual TreeIteratorBase<TTreeType>* itk::TreeIteratorBase< TTreeType >::Parents (  )  [virtual, inherited]

Return a list of parents

template<class TTreeType>
bool itk::TreeIteratorBase< TTreeType >::Remove (  )  [inherited]

Remove the current node from the tree

template<class TTreeType>
virtual bool itk::TreeIteratorBase< TTreeType >::RemoveChild ( int  number  )  [virtual, inherited]

Remove a child

template<class TTreeType>
ValueType itk::TreeIteratorBase< TTreeType >::Set ( ValueType  element  )  [inherited]

Set the current value of the node


Member Data Documentation

template<class TTreeType>
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().

template<class TTreeType>
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=().

template<class TTreeType>
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().

template<class TTreeType>
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().

template<class TTreeType>
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=().


The documentation for this class was generated from the following file:
Generated at Mon Mar 12 05:25:53 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000