fcppt::io::basic_scoped_rdbuf<
	Ch,
	Traits
>::basic_scoped_rdbuf(
	stream_type &_source,
	stream_type &_receiver
)
:
	receiver_(
		_receiver
	),
	old_(
		_receiver.rdbuf()
	)
{
	receiver_.rdbuf(
		_source.rdbuf()
	);
}
        result_type operator() (stream_type& strm, value_type const& value) const
        {
            strm.flush();
            typedef typename stream_type::streambuf_type streambuf_type;
            string_type& str = *static_cast< streambuf_type* >(strm.rdbuf())->storage();

            char_type buf[std::numeric_limits< unsigned int >::digits10 + 2];
            char_type* p = buf;

            typedef karma::uint_generator< unsigned int, 10 > uint_gen;
            karma::generate(p, uint_gen(), value.line);
            str.append(buf, p);
        }
Beispiel #3
0
		~basic_reporterstream()
		{
			streambuf_type *buf;
			if (buf = static_cast<streambuf_type*>(mStream.rdbuf()))
				mReporter->report(mLog, buf->str(), mOptions);
		}