Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class stream_holder

boost::unit_test::runtime_config::stream_holder

Synopsis

// In header: <boost/test/unit_test_parameters.hpp>


class stream_holder {
public:
  // member classes/structs/unions

  struct callback_cleaner {
    // construct/copy/destruct
    callback_cleaner(boost::function< void()>);
    ~callback_cleaner();

    // public data members
    boost::function< void()> m_cleaner_callback;
    std::ofstream m_file;
  };
  // construct/copy/destruct
  explicit stream_holder(std::ostream & = std::cout);

  // public member functions
  void setup(const const_string &, 
             boost::function< void()> const & = boost::function< void()>());
  std::ostream & ref() const;
};

Description

stream_holder public construct/copy/destruct

  1. explicit stream_holder(std::ostream & default_stream = std::cout);

stream_holder public member functions

  1. void setup(const const_string & stream_name, 
               boost::function< void()> const & cleaner_callback = boost::function< void()>());
  2. std::ostream & ref() const;

PrevUpHomeNext