Java iterators for C++:
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
Tree_LPR< E > Class Template Reference

Left-Process-Right iterator. More...

#include <Tree_LPR.h>

Public Member Functions

void set (const TL::Tree< E > &T)
 Iterator::set(). More...
 
bool hasNext () const
 Iterator::hasNext(). More...
 
const TL::Tree< E > next ()
 Iterator::next(). More...
 
void push_left_descendants (const TL::Tree< E > &T)
 Push every Child(0) [left] descendant of T in the stack. More...
 

Public Attributes

 __pad0__: m_S(32) { set(T)
 init(). More...
 

Private Attributes

std::vector< TL::Tree< E > > m_S
 std::stack<>. More...
 

Detailed Description

template<typename E>
class Tree_LPR< E >

Left-Process-Right iterator.

{{ // test::Tree_LPR()
Tree_LPR<char> iter; std::string L;
iter.set(T);
while ( iter.hasNext() ) {
TL::Tree<char> S = iter.next();
L.push_back( *S );
}
assertTrue( L == "fbghacdieljnmok" && "Tree_LPR" );
}}

See Also
test_iterJava::test_Tree_LPR()
make_a_o(TL::Tree<char> & T)
T = a

Definition at line 63 of file Tree_LPR.h.

Member Function Documentation

template<typename E >
void Tree_LPR< E >::set ( const TL::Tree< E > &  T)

Iterator::set().

Definition at line 78 of file Tree_LPR.h.

template<typename E >
bool Tree_LPR< E >::hasNext ( ) const

Iterator::hasNext().

Definition at line 101 of file Tree_LPR.h.

template<typename E >
const TL::Tree< E > Tree_LPR< E >::next ( )

Iterator::next().

Definition at line 119 of file Tree_LPR.h.

template<typename E >
void Tree_LPR< E >::push_left_descendants ( const TL::Tree< E > &  T)

Push every Child(0) [left] descendant of T in the stack.

Definition at line 91 of file Tree_LPR.h.

Member Data Documentation

template<typename E>
std::vector< TL::Tree<E> > Tree_LPR< E >::m_S
private

std::stack<>.

Definition at line 64 of file Tree_LPR.h.

template<typename E>
Tree_LPR< E >::__pad0__

init().

Definition at line 68 of file Tree_LPR.h.


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