herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
exsample::binary_tree< Value >::ostream_visitor< OStream > Struct Template Reference

forward visitor writing out the tree to given ostream More...

#include <binary_tree.h>

Public Member Functions

 ostream_visitor (OStream &os)
 construct from ostream reference
 
void visit (const value_type &)
 visit a leaf node
 
void visit (const value_type &parent, const value_type &left, const value_type &right)
 visit a branching
 

Private Attributes

OStream * os_
 pointer to the ostream to write to
 
bool first_time_
 whether we are at the or not
 

Detailed Description

template<class Value>
template<class OStream>
struct exsample::binary_tree< Value >::ostream_visitor< OStream >

forward visitor writing out the tree to given ostream

Definition at line 658 of file binary_tree.h.

Constructor & Destructor Documentation

◆ ostream_visitor()

template<class Value >
template<class OStream >
exsample::binary_tree< Value >::ostream_visitor< OStream >::ostream_visitor ( OStream &  os)
inlineexplicit

construct from ostream reference

Definition at line 661 of file binary_tree.h.

Member Function Documentation

◆ visit() [1/2]

template<class Value >
template<class OStream >
void exsample::binary_tree< Value >::ostream_visitor< OStream >::visit ( const value_type )
inline

◆ visit() [2/2]

Member Data Documentation

◆ first_time_

template<class Value >
template<class OStream >
bool exsample::binary_tree< Value >::ostream_visitor< OStream >::first_time_
private

whether we are at the or not

Definition at line 695 of file binary_tree.h.

Referenced by exsample::binary_tree< Value >::ostream_visitor< OStream >::visit().

◆ os_

template<class Value >
template<class OStream >
OStream* exsample::binary_tree< Value >::ostream_visitor< OStream >::os_
private

pointer to the ostream to write to

Definition at line 692 of file binary_tree.h.

Referenced by exsample::binary_tree< Value >::ostream_visitor< OStream >::visit().


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