Honeycomb  0.1
Component-Model Framework
Public Types | Public Member Functions | List of all members
honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode > Class Template Reference

Depth-first pre-order traversal. More...

#include <Tree.h>

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef TreeNode value_type
 
typedef sdt difference_type
 
typedef TreeNodepointer
 
typedef TreeNodereference
 

Public Member Functions

 PreOrdIter_ ()
 
 PreOrdIter_ (TreeNode *root, bool end)
 
PreOrdIter_operator++ ()
 
PreOrdIter_operator-- ()
 
PreOrdIter_ operator++ (int)
 
PreOrdIter_ operator-- (int)
 
bool operator== (const PreOrdIter_ &rhs) const
 
bool operator!= (const PreOrdIter_ &rhs) const
 
reference operator* () const
 
pointer operator-> () const
 
void skipChildren ()
 Skip the current node's children on next step of this iterator. More...
 
szt count () const
 Get the number of nodes between the current position and the beginning of the iteration. More...
 

Detailed Description

template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode>
class honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >

Depth-first pre-order traversal.

The first node returned is the root, followed by a path through all the first children. The last node returned is the leaf node at the end of a path through all the last children. Do not modify tree while traversing.

Member Typedef Documentation

template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
typedef sdt honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::difference_type
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
typedef std::bidirectional_iterator_tag honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::iterator_category
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
typedef TreeNode* honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::pointer
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
typedef TreeNode& honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::reference
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
typedef TreeNode honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::value_type

Constructor & Destructor Documentation

template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::PreOrdIter_ ( )
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::PreOrdIter_ ( TreeNode root,
bool  end 
)
inline

Member Function Documentation

template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
szt honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::count ( ) const
inline

Get the number of nodes between the current position and the beginning of the iteration.

template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
bool honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator!= ( const PreOrdIter_< TreeNode > &  rhs) const
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
reference honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator* ( ) const
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
PreOrdIter_& honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator++ ( )
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
PreOrdIter_ honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator++ ( int  )
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
PreOrdIter_& honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator-- ( )
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
PreOrdIter_ honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator-- ( int  )
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
pointer honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator-> ( ) const
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
bool honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::operator== ( const PreOrdIter_< TreeNode > &  rhs) const
inline
template<class Data_, class Key_ = Id, template< class > class Alloc = SmallAllocator>
template<class TreeNode >
void honey::TreeNode< Data_, Key_, Alloc >::PreOrdIter_< TreeNode >::skipChildren ( )
inline

Skip the current node's children on next step of this iterator.


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