File indexing completed on 2025-12-15 10:09:31
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_THREAD_OSTREAM_BUFFER_HPP
0008 #define BOOST_THREAD_OSTREAM_BUFFER_HPP
0009
0010 #include <boost/thread/detail/config.hpp>
0011 #include <boost/thread/detail/delete.hpp>
0012 #include <sstream>
0013
0014 #include <boost/config/abi_prefix.hpp>
0015
0016 namespace boost
0017 {
0018
0019 template <typename OStream>
0020 class ostream_buffer
0021 {
0022 public:
0023 typedef std::basic_ostringstream<typename OStream::char_type, typename OStream::traits_type> stream_type;
0024 ostream_buffer(OStream& os) :
0025 os_(os)
0026 {
0027 }
0028 ~ostream_buffer()
0029 {
0030 os_ << o_str_.str();
0031 }
0032 stream_type& stream()
0033 {
0034 return o_str_;
0035 }
0036 private:
0037 OStream& os_;
0038 stream_type o_str_;
0039 };
0040
0041 }
0042
0043 #include <boost/config/abi_suffix.hpp>
0044
0045 #endif