proj home

Files   Classes   Functions   Hierarchy  

treeindexedD2iterleaf< T > Class Template Reference

Iterate over the leaves. More...

#include <treeindexedD2iter.h>

Inheritance diagram for treeindexedD2iterleaf< T >:
Collaboration diagram for treeindexedD2iterleaf< T >:

List of all members.

Public Member Functions

 treeindexedD2iterleaf (treeindexedD2< T > &tree_, boolc setreset=true)
 Pass in the tree.
void operator++ ()
 Move to the next leaf.
 treeindexedD2iterleaf (treeindexedD2< T > &tree_, boolc setreset=true)
 Pass in the tree.
void operator++ ()
 Move to the next leaf.


Detailed Description

template<typename T>
class treeindexedD2iterleaf< T >

Iterate over the leaves.

Example
  cout << "Iterating over the leaves." << endl;
  for ( treeindexedD2iterleaf<uint> i3(t1); !i3; ++i3 )
    cout << i3()->index << " ";  

Definition at line 70 of file treeindexedD2iter.h.


Constructor & Destructor Documentation

template<typename T>
treeindexedD2iterleaf< T >::treeindexedD2iterleaf ( treeindexedD2< T > &  tree_,
boolc  setreset = true 
) [inline]

Pass in the tree.

Definition at line 76 of file treeindexedD2iter.h.

00080     : treeindexedD2iter<T>(tree_,setreset) {}

template<typename T>
treeindexedD2iterleaf< T >::treeindexedD2iterleaf ( treeindexedD2< T > &  tree_,
boolc  setreset = true 
) [inline]

Pass in the tree.

Definition at line 76 of file treeindexediter.h.

00080     : treeindexedD2iter<T>(tree_,setreset) {}


Member Function Documentation

template<typename T>
void treeindexedD2iterleaf< T >::operator++ (  ) 

Move to the next leaf.

Reimplemented from treeindexedD2iter< T >.

template<typename T >
void treeindexedD2iterleaf< T >::operator++ (  )  [inline]

Move to the next leaf.

Reimplemented from treeindexedD2iter< T >.

Definition at line 161 of file treeindexedD2iter.h.

00162 {
00163   treeindexedD2iter<T>::operator ++ ();
00164 
00165   while (treeindexedD2iter<T>::operator ! ()) 
00166   {
00167     if (treeindexedD2iter<T>::operator ()()->isleaf())
00168       return;
00169 
00170     treeindexedD2iter<T>::operator ++ ();
00171   }
00172 }


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

Generated on Fri Mar 4 00:50:20 2011 for Chelton Evans Source by  doxygen 1.5.8