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

generator reading binary tree from istream More...

#include <binary_tree.h>

Public Member Functions

 istream_generator (IStream &is)
 construct from istream reference
 
 istream_generator (const istream_generator &x)
 copy constructor
 
value_type root ()
 read the root node
 
bool split ()
 read children nodes
 
std::pair< value_type, value_typegenerate (const value_type &)
 return the children generated
 
void initialize_leaf (const value_type &)
 initialize a leaf
 

Private Attributes

IStream * is_
 pointer to the istream used
 
std::pair< value_type, value_typechildren_
 the children currently handled
 
std::string tag_
 temporary storage for tags
 

Detailed Description

template<class Value>
template<class IStream>
struct exsample::binary_tree< Value >::istream_generator< IStream >

generator reading binary tree from istream

Definition at line 701 of file binary_tree.h.

Constructor & Destructor Documentation

◆ istream_generator() [1/2]

template<class Value >
template<class IStream >
exsample::binary_tree< Value >::istream_generator< IStream >::istream_generator ( IStream &  is)
inlineexplicit

construct from istream reference

Definition at line 704 of file binary_tree.h.

◆ istream_generator() [2/2]

template<class Value >
template<class IStream >
exsample::binary_tree< Value >::istream_generator< IStream >::istream_generator ( const istream_generator< IStream > &  x)
inline

copy constructor

Definition at line 708 of file binary_tree.h.

Member Function Documentation

◆ generate()

template<class Value >
template<class IStream >
std::pair< value_type, value_type > exsample::binary_tree< Value >::istream_generator< IStream >::generate ( const value_type )
inline

return the children generated

Definition at line 743 of file binary_tree.h.

References exsample::binary_tree< Value >::istream_generator< IStream >::children_.

◆ initialize_leaf()

template<class Value >
template<class IStream >
void exsample::binary_tree< Value >::istream_generator< IStream >::initialize_leaf ( const value_type )
inline

initialize a leaf

Definition at line 748 of file binary_tree.h.

◆ root()

template<class Value >
template<class IStream >
value_type exsample::binary_tree< Value >::istream_generator< IStream >::root ( )
inline

◆ split()

Member Data Documentation

◆ children_

template<class Value >
template<class IStream >
std::pair<value_type,value_type> exsample::binary_tree< Value >::istream_generator< IStream >::children_
private

◆ is_

template<class Value >
template<class IStream >
IStream* exsample::binary_tree< Value >::istream_generator< IStream >::is_
private

◆ tag_

template<class Value >
template<class IStream >
std::string exsample::binary_tree< Value >::istream_generator< IStream >::tag_
private

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