29 : _output_buf(4096), _callback(cb)
31 setp(&_output_buf[0], &_output_buf[4096 - 1]);
40 int ret = std::char_traits<char>::eq_int_type(this->
overflow(
41 std::char_traits<char>::eof()), std::char_traits<char>::eof()) ? -1
49 char *ibegin = &_output_buf[0];
53 setp(&_output_buf[0], &_output_buf[4096 - 1]);
55 if (!std::char_traits<char>::eq_int_type(c, std::char_traits<char>::eof()))
57 *iend++ = std::char_traits<char>::to_char_type(c);
61 if ((iend - ibegin) == 0)
63 return std::char_traits<char>::not_eof(c);
66 _callback.
payload(&_output_buf[0], (iend - ibegin));
68 return std::char_traits<char>::not_eof(c);
72 : _callback(cb), _mode(mode) {
92 std::ostream stream(&streambuf);