29 : _eof(false), _data_size(0), _buf_size(buffer), _input_buf(buffer), _interim_buf(buffer), _output_buf(buffer)
33 setp(&_input_buf[0], &_input_buf[0] + _buf_size - 1);
49 int ret = std::char_traits<char>::eq_int_type(this->
overflow(
50 std::char_traits<char>::eof()), std::char_traits<char>::eof()) ? -1
58 char *ibegin = &_input_buf[0];
62 setp(&_input_buf[0], &_input_buf[0] + _buf_size - 1);
64 if (!std::char_traits<char>::eq_int_type(c, std::char_traits<char>::eof()))
66 *iend++ = std::char_traits<char>::to_char_type(c);
70 if ((iend - ibegin) == 0)
72 return std::char_traits<char>::not_eof(c);
78 while (_data_size > 0)
85 _data_size = (iend - ibegin);
88 ::memcpy(&_interim_buf[0], &_input_buf[0], _data_size);
93 return std::char_traits<char>::not_eof(c);
101 while (_data_size == 0)
104 if (_eof)
return std::char_traits<char>::eof();
110 ::memcpy(&_output_buf[0], &_interim_buf[0], _data_size);
114 setg(&_output_buf[0], &_output_buf[0], &_output_buf[0] + _data_size);
120 return std::char_traits<char>::not_eof(_output_buf[0]);