34 #ifndef _STREAMBUF_TCC 35 #define _STREAMBUF_TCC 1 37 #pragma GCC system_header 39 namespace std _GLIBCXX_VISIBILITY(default)
41 _GLIBCXX_BEGIN_NAMESPACE_VERSION
43 template<
typename _CharT,
typename _Traits>
51 const streamsize __buf_len = this->egptr() - this->gptr();
56 traits_type::copy(__s, this->gptr(), __len);
59 this->__safe_gbump(__len);
65 if (!traits_type::eq_int_type(__c, traits_type::eof()))
67 traits_type::assign(*__s++, traits_type::to_char_type(__c));
77 template<
typename _CharT,
typename _Traits>
85 const streamsize __buf_len = this->epptr() - this->pptr();
90 traits_type::copy(this->pptr(), __s, __len);
93 this->__safe_pbump(__len);
98 int_type __c = this->overflow(traits_type::to_int_type(*__s));
99 if (!traits_type::eq_int_type(__c, traits_type::eof()))
114 template<
typename _CharT,
typename _Traits>
122 typename _Traits::int_type __c = __sbin->
sgetc();
123 while (!_Traits::eq_int_type(__c, _Traits::eof()))
125 __c = __sbout->
sputc(_Traits::to_char_type(__c));
126 if (_Traits::eq_int_type(__c, _Traits::eof()))
137 template<
typename _CharT,
typename _Traits>
143 return __copy_streambufs_eof(__sbin, __sbout, __ineof);
148 #if _GLIBCXX_EXTERN_TEMPLATE 159 #ifdef _GLIBCXX_USE_WCHAR_T 172 _GLIBCXX_END_NAMESPACE_VERSION
The actual work of input and output (interface).
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
_GLIBCXX14_CONSTEXPR const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
int_type snextc()
Getting the next character.
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
int_type sputc(char_type __c)
Entry point for all single-character output functions.
int_type sgetc()
Getting the next character.
traits_type::int_type int_type
ISO C++ entities toplevel namespace is std.
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.