Orfeo Toolbox  4.2
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
itk::PreOrderTreeIterator< TTreeType > Class Template Reference

#include <itkPreOrderTreeIterator.h>

+ Inheritance diagram for itk::PreOrderTreeIterator< TTreeType >:
+ Collaboration diagram for itk::PreOrderTreeIterator< TTreeType >:

Public Types

typedef
TreeNodeType::ChildIdentifier 
ChildIdentifier
 
typedef Superclass::NodeType NodeType
 
typedef TreeIteratorBase Self
 
typedef TreeIteratorBase
< TTreeType > 
Superclass
 
typedef Superclass::TreeNodeType TreeNodeType
 
typedef TTreeType::ValueType ValueType
 

Public Member Functions

 PreOrderTreeIterator (const TTreeType *tree, const TreeNodeType *start=NULL)
 
virtual bool Add (ValueType element)
 
virtual bool Add (int position, ValueType element)
 
virtual bool Add (TTreeType &subTree)
 
virtual int ChildPosition (ValueType element) const
 
virtual TreeIteratorBase
< TTreeType > * 
Children ()
 
TreeIteratorBase< TTreeType > * Clone ()
 
virtual int Count ()
 
virtual int CountChildren () const
 
virtual bool Disconnect ()
 
virtual const ValueTypeGet () const
 
virtual TreeIteratorBase
< TTreeType > * 
GetChild (int number) const
 
virtual TreeNodeTypeGetNode ()
 
virtual const TreeNodeTypeGetNode () const
 
const TreeNodeTypeGetParent () const
 
TreeNodeTypeGetRoot ()
 
const TreeNodeTypeGetRoot () const
 
virtual TTreeType * GetSubTree () const
 
TTreeType * GetTree () const
 
NodeType GetType () const
 
void GoToBegin ()
 
virtual bool GoToChild (ChildIdentifier 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
 
Selfoperator++ ()
 
void operator++ (int)
 
virtual TreeIteratorBase
< TTreeType > * 
Parents ()
 
bool Remove ()
 
virtual bool RemoveChild (int number)
 
void Set (ValueType element)
 

Protected Member Functions

bool HasNext () const
 
const ValueTypeNext ()
 

Protected Attributes

TreeNodeTypem_Begin
 
TreeNodeTypem_End
 
TreeNodeTypem_Position
 
const TreeNodeTypem_Root
 
TTreeType * m_Tree
 

Private Member Functions

const TreeNodeTypeFindNextNode () const
 

Friends

class LeafTreeIterator< TTreeType >
 

Detailed Description

template<typename TTreeType>
class itk::PreOrderTreeIterator< TTreeType >

Definition at line 30 of file itkPreOrderTreeIterator.h.

Member Typedef Documentation

template<typename TTreeType>
typedef TreeNodeType::ChildIdentifier itk::TreeIteratorBase< TTreeType >::ChildIdentifier
inherited

Definition at line 50 of file itkTreeIteratorBase.h.

template<typename TTreeType>
typedef Superclass::NodeType itk::PreOrderTreeIterator< TTreeType >::NodeType

Definition at line 38 of file itkPreOrderTreeIterator.h.

template<typename TTreeType>
typedef TreeIteratorBase itk::TreeIteratorBase< TTreeType >::Self
inherited

Typedefs

Definition at line 47 of file itkTreeIteratorBase.h.

template<typename TTreeType>
typedef TreeIteratorBase< TTreeType > itk::PreOrderTreeIterator< TTreeType >::Superclass

Definition at line 36 of file itkPreOrderTreeIterator.h.

template<typename TTreeType>
typedef Superclass::TreeNodeType itk::PreOrderTreeIterator< TTreeType >::TreeNodeType

Definition at line 37 of file itkPreOrderTreeIterator.h.

template<typename TTreeType>
typedef TTreeType::ValueType itk::PreOrderTreeIterator< TTreeType >::ValueType

Typedefs

Definition at line 35 of file itkPreOrderTreeIterator.h.

Constructor & Destructor Documentation

template<typename TTreeType >
itk::PreOrderTreeIterator< TTreeType >::PreOrderTreeIterator ( const TTreeType *  tree,
const TreeNodeType start = NULL 
)

Constructor

Definition at line 69 of file itkPreOrderTreeIterator.h.

Member Function Documentation

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::Add ( ValueType  element)
virtualinherited

Add an element to the tree

Add a value to the node. This creates a new child node

Definition at line 99 of file itkTreeIteratorBase.hxx.

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

Referenced by itk::TreeContainer< TValue >::Add().

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::Add ( int  position,
ValueType  element 
)
virtualinherited

Add an element at a given position

Add a new element at a given position

Definition at line 134 of file itkTreeIteratorBase.hxx.

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

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::Add ( TTreeType &  subTree)
virtualinherited

Add a subtree

Definition at line 183 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
int itk::TreeIteratorBase< TTreeType >::ChildPosition ( ValueType  element) const
virtualinherited

Return the current ChildPosition of an element

Return the current position of the child

Definition at line 240 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
TreeIteratorBase< TTreeType > * itk::TreeIteratorBase< TTreeType >::Children ( )
virtualinherited

Return a list of children

Return the children list

Definition at line 337 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
TreeIteratorBase< TTreeType > * itk::PreOrderTreeIterator< TTreeType >::Clone ( )
virtual

Clone function

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 173 of file itkPreOrderTreeIterator.h.

template<typename TTreeType >
int itk::TreeIteratorBase< TTreeType >::Count ( )
virtualinherited

Count the number of nodes

Count the number of nodes from the beginning

Definition at line 427 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
int itk::TreeIteratorBase< TTreeType >::CountChildren ( ) const
virtualinherited

Count the number of children

Definition at line 280 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::Disconnect ( )
virtualinherited

Disconnect the tree

Definition at line 300 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
const PreOrderTreeIterator< TTreeType >::TreeNodeType * itk::PreOrderTreeIterator< TTreeType >::FindNextNode ( ) const
private

Find the next node

Definition at line 105 of file itkPreOrderTreeIterator.h.

template<typename TTreeType >
const TreeIteratorBase< TTreeType >::ValueType & itk::TreeIteratorBase< TTreeType >::Get ( void  ) const
virtualinherited
template<typename TTreeType >
TreeIteratorBase< TTreeType > * itk::TreeIteratorBase< TTreeType >::GetChild ( int  number) const
virtualinherited

Return a list of child

Get a child given a number

Definition at line 407 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
TreeIteratorBase< TTreeType >::TreeNodeType * itk::TreeIteratorBase< TTreeType >::GetNode ( )
virtualinherited
template<typename TTreeType >
const TreeIteratorBase< TTreeType >::TreeNodeType * itk::TreeIteratorBase< TTreeType >::GetNode ( ) const
virtualinherited

Get the node pointed by the iterator

Definition at line 454 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
const TreeIteratorBase< TTreeType >::TreeNodeType * itk::TreeIteratorBase< TTreeType >::GetParent ( ) const
inherited

Return the first parent found

Definition at line 348 of file itkTreeIteratorBase.hxx.

Referenced by itk::TreeContainer< TValue >::PrintSelf().

template<typename TTreeType >
TreeIteratorBase< TTreeType >::TreeNodeType * itk::TreeIteratorBase< TTreeType >::GetRoot ( )
inherited

Get the root

Definition at line 462 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
const TreeIteratorBase< TTreeType >::TreeNodeType * itk::TreeIteratorBase< TTreeType >::GetRoot ( ) const
inherited

Get the root (const)

Definition at line 470 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
TTreeType * itk::TreeIteratorBase< TTreeType >::GetSubTree ( ) const
virtualinherited

Get the subtree

Return the subtree

Definition at line 213 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
TTreeType * itk::TreeIteratorBase< TTreeType >::GetTree ( ) const
inherited

Get the tree

Return the tree

Definition at line 522 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
PreOrderTreeIterator< TTreeType >::NodeType itk::PreOrderTreeIterator< TTreeType >::GetType ( void  ) const
virtual

Get the type of the iterator

Return the type of the iterator

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 76 of file itkPreOrderTreeIterator.h.

template<typename TTreeType>
void itk::TreeIteratorBase< TTreeType >::GoToBegin ( void  )
inlineinherited
template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::GoToChild ( ChildIdentifier  number = 0)
virtualinherited

Go to the specified child

Go to a child

Reimplemented in itk::ChildTreeIterator< TTreeType >.

Definition at line 370 of file itkTreeIteratorBase.hxx.

template<typename TTreeType>
void itk::TreeIteratorBase< TTreeType >::GoToEnd ( void  )
inlineinherited

Move an iterator to the end of the tree.

Definition at line 152 of file itkTreeIteratorBase.h.

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

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::GoToParent ( )
virtualinherited

Go to the parent

Go to a parent

Reimplemented in itk::ChildTreeIterator< TTreeType >.

Definition at line 389 of file itkTreeIteratorBase.hxx.

Referenced by otb::VectorData< TPrecision, VDimension, TValuePrecision >::PrintSelf().

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::HasChild ( int  number = 0) const
virtualinherited

Return true if the current node has a child

Return true of the current node has a child

Definition at line 224 of file itkTreeIteratorBase.hxx.

Referenced by itk::LeafTreeIterator< TTreeType >::FindNextNode().

template<typename TTreeType >
bool itk::PreOrderTreeIterator< TTreeType >::HasNext ( ) const
protectedvirtual

Return true if the next node exists

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 84 of file itkPreOrderTreeIterator.h.

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::HasParent ( ) const
virtualinherited

Return true if the current node has a parent

Return true of the pointed node has a parent

Definition at line 292 of file itkTreeIteratorBase.hxx.

Referenced by itk::TreeContainer< TValue >::IsRoot(), and otb::VectorData< TPrecision, VDimension, TValuePrecision >::PrintSelf().

template<typename TTreeType>
bool itk::TreeIteratorBase< TTreeType >::IsAtBegin ( void  ) const
inlineinherited

Is the iterator at the beginning of the tree?

Definition at line 155 of file itkTreeIteratorBase.h.

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

template<typename TTreeType>
bool itk::TreeIteratorBase< TTreeType >::IsAtEnd ( void  ) const
inlineinherited
template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::IsLeaf ( ) const
virtualinherited

Return true if the current node is a leaf

Return true if the current pointed node is a leaf

Definition at line 158 of file itkTreeIteratorBase.hxx.

Referenced by itk::TreeContainer< TValue >::IsLeaf().

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::IsRoot ( ) const
virtualinherited

Return true if the current node is a root

Return true if the current pointed node is a root

Definition at line 166 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
const PreOrderTreeIterator< TTreeType >::ValueType & itk::PreOrderTreeIterator< TTreeType >::Next ( )
protectedvirtual

Return the next node

Implements itk::TreeIteratorBase< TTreeType >.

Definition at line 96 of file itkPreOrderTreeIterator.h.

template<typename TTreeType>
Self& itk::TreeIteratorBase< TTreeType >::operator++ ( )
inlineinherited

operator++

Definition at line 166 of file itkTreeIteratorBase.h.

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

template<typename TTreeType>
void itk::TreeIteratorBase< TTreeType >::operator++ ( int  )
inlineinherited

operator++

Definition at line 174 of file itkTreeIteratorBase.h.

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

template<typename TTreeType >
TreeIteratorBase< TTreeType > * itk::TreeIteratorBase< TTreeType >::Parents ( )
virtualinherited

Return a list of parents

Return the list of parents

Definition at line 360 of file itkTreeIteratorBase.hxx.

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::Remove ( )
inherited

Remove the current node from the tree

Remove a specific node (and its child nodes!)

Definition at line 478 of file itkTreeIteratorBase.hxx.

Referenced by itk::TreeContainer< TValue >::Clear().

template<typename TTreeType >
bool itk::TreeIteratorBase< TTreeType >::RemoveChild ( int  number)
virtualinherited

Remove a child

Definition at line 252 of file itkTreeIteratorBase.hxx.

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

template<typename TTreeType >
void itk::TreeIteratorBase< TTreeType >::Set ( ValueType  element)
inherited

Set the current value of the node

Definition at line 88 of file itkTreeIteratorBase.hxx.

Friends And Related Function Documentation

template<typename TTreeType>
friend class LeafTreeIterator< TTreeType >
friend

LeafTreeIterator uses PreOrderTreeIterator in its implementation, but it needs to adjust its root. A friend designation is added to correct behavior and retain backwards compatible behavior.

Definition at line 64 of file itkPreOrderTreeIterator.h.

Member Data Documentation

template<typename TTreeType>
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Begin
mutableprotectedinherited
template<typename TTreeType>
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_End
mutableprotectedinherited
template<typename TTreeType>
TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Position
mutableprotectedinherited
template<typename TTreeType>
const TreeNodeType* itk::TreeIteratorBase< TTreeType >::m_Root
protectedinherited
template<typename TTreeType>
TTreeType* itk::TreeIteratorBase< TTreeType >::m_Tree
protectedinherited

The documentation for this class was generated from the following file:

Generated at Sat Aug 30 2014 17:47:49 for Orfeo Toolbox with doxygen 1.8.3.1