C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount > Struct Template Reference

Establish an iterator to contain in-order traversal of the binary tree. More...

#include <exercise-5-10.hpp>

Inheritance diagram for exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >:
boost::mpl::end_impl< exercise_5_10::inorder_view_tag >::apply

Public Types

typedef Cur current_tree
 
typedef Parent parent_iterator
 
typedef inorder_view_iterator< Cur, Parent, VisitCount > type
 

Static Public Attributes

static int const visit_count = VisitCount
 

Detailed Description

template<typename Cur, typename Parent, int VisitCount>
struct exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >

Establish an iterator to contain in-order traversal of the binary tree.

Template Parameters
CurThe current (sub)tree.
ParentThis is an iterator to the parent of this (sub)tree, or "void_".
VisitCountThis is a marker to indicate next steps during tree traversal. In an in-order tree traversal, a visit count of 0 indicates "descent left", 1 indicates "return myself," and 2 indicates "descent right."

Definition at line 99 of file exercise-5-10.hpp.

Member Typedef Documentation

◆ current_tree

template<typename Cur , typename Parent , int VisitCount>
typedef Cur exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >::current_tree

Definition at line 101 of file exercise-5-10.hpp.

◆ parent_iterator

template<typename Cur , typename Parent , int VisitCount>
typedef Parent exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >::parent_iterator

Definition at line 102 of file exercise-5-10.hpp.

◆ type

template<typename Cur , typename Parent , int VisitCount>
typedef inorder_view_iterator<Cur, Parent, VisitCount> exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >::type

Definition at line 105 of file exercise-5-10.hpp.

Member Data Documentation

◆ visit_count

template<typename Cur , typename Parent , int VisitCount>
int const exercise_5_10::inorder_view_iterator< Cur, Parent, VisitCount >::visit_count = VisitCount
static

Definition at line 103 of file exercise-5-10.hpp.


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