$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2007-05-21 02:47:15
Christian Henning <chhenning <at> gmail.com> writes:
> 
> Thanks a lot, again. 
> 
> This is the working code now.
> [cut]
You can use transform + ostream_iterator instead of for_each + print.
transform( m_data.begin()
         , m_data.end()
         , ostream_iterator<string>(cout, "\n")
         , boost::bind( &Base::to_String
                      , _1
                      , indent_value));
And instead of handcrafted loop for indentation you can use constructor of 
std::string.
virtual string to_String ( boost::uint32_t indent )
{
    stringstream output;
    output << string(indent, ' ') << m_value;
    return output.str();
}
Roman Perepelitsa.