ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::LevelOrderTreeIterator< TTreeType > Class Template Reference

#include <itkLevelOrderTreeIterator.h>

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

List of all members.

Public Types

typedef Superclass::NodeType NodeType
typedef LevelOrderTreeIterator Self
typedef TreeIteratorBase
< TTreeType > 
Superclass
typedef Superclass::TreeNodeType TreeNodeType
typedef TTreeType TreeType
typedef TTreeType::ValueType ValueType

Public Member Functions

TreeIteratorBase< TTreeType > * Clone ()
int GetEndLevel () const
int GetLevel () const
int GetStartLevel () const
NodeType GetType () const
 LevelOrderTreeIterator (TreeType *tree, int endLevel=INT_MAX, const TreeNodeType *start=NULL)
 LevelOrderTreeIterator (TreeType *tree, int startLevel, int endLevel, const TreeNodeType *start=NULL)
virtual ~LevelOrderTreeIterator ()
const Selfoperator= (const Self &iterator)

Protected Member Functions

bool HasNext () const
const ValueTypeNext ()

Private Member Functions

const TreeNodeTypeFindNextNode () const
const TreeNodeTypeFindNextNodeHelp () const
int GetLevel (const TreeNodeType *node) const

Private Attributes

int m_EndLevel
std::queue< const TreeNodeType * > m_Queue
int m_StartLevel

Detailed Description

template<class TTreeType>
class itk::LevelOrderTreeIterator< TTreeType >

Iterate over a tree in level order.

Definition at line 34 of file itkLevelOrderTreeIterator.h.


Member Typedef Documentation

template<class TTreeType >
typedef Superclass::NodeType itk::LevelOrderTreeIterator< TTreeType >::NodeType

Enumerations

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 44 of file itkLevelOrderTreeIterator.h.

template<class TTreeType >
typedef LevelOrderTreeIterator itk::LevelOrderTreeIterator< TTreeType >::Self

Typedefs

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 39 of file itkLevelOrderTreeIterator.h.

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

Definition at line 40 of file itkLevelOrderTreeIterator.h.

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

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 43 of file itkLevelOrderTreeIterator.h.

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

Definition at line 41 of file itkLevelOrderTreeIterator.h.

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

Reimplemented from itk::TreeIteratorBase< TTreeType >.

Definition at line 42 of file itkLevelOrderTreeIterator.h.


Constructor & Destructor Documentation

template<class TTreeType >
itk::LevelOrderTreeIterator< TTreeType >::LevelOrderTreeIterator ( TreeType tree,
int  endLevel = INT_MAX,
const TreeNodeType start = NULL 
)

Constructor with end level specification

template<class TTreeType >
itk::LevelOrderTreeIterator< TTreeType >::LevelOrderTreeIterator ( TreeType tree,
int  startLevel,
int  endLevel,
const TreeNodeType start = NULL 
)

Constructor with end level specification

template<class TTreeType >
virtual itk::LevelOrderTreeIterator< TTreeType >::~LevelOrderTreeIterator ( ) [inline, virtual]

Definition at line 52 of file itkLevelOrderTreeIterator.h.


Member Function Documentation

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

Clone function

Implements itk::TreeIteratorBase< TTreeType >.

template<class TTreeType >
const TreeNodeType* itk::LevelOrderTreeIterator< TTreeType >::FindNextNode ( ) const [private]
template<class TTreeType >
const TreeNodeType* itk::LevelOrderTreeIterator< TTreeType >::FindNextNodeHelp ( ) const [private]
template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::GetEndLevel ( ) const

Get the end level

template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::GetLevel ( ) const

Get the current level

template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::GetLevel ( const TreeNodeType node) const [private]
template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::GetStartLevel ( ) const

Get the start level

template<class TTreeType >
NodeType itk::LevelOrderTreeIterator< TTreeType >::GetType ( ) const [virtual]

Get the type of the iterator

Implements itk::TreeIteratorBase< TTreeType >.

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

Return true if the next node exists

Implements itk::TreeIteratorBase< TTreeType >.

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

Return the next node

Implements itk::TreeIteratorBase< TTreeType >.

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

Member Data Documentation

template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::m_EndLevel [private]
template<class TTreeType >
std::queue< const TreeNodeType * > itk::LevelOrderTreeIterator< TTreeType >::m_Queue [mutable, private]
template<class TTreeType >
int itk::LevelOrderTreeIterator< TTreeType >::m_StartLevel [private]

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