34 #ifndef _GLIBCXX_SSTREAM
35 #define _GLIBCXX_SSTREAM 1
37 #pragma GCC system_header
42 namespace std _GLIBCXX_VISIBILITY(default)
44 _GLIBCXX_BEGIN_NAMESPACE_VERSION
59 template<
typename _CharT,
typename _Traits,
typename _Alloc>
60 class basic_stringbuf :
public basic_streambuf<_CharT, _Traits>
64 typedef _CharT char_type;
65 typedef _Traits traits_type;
68 typedef _Alloc allocator_type;
69 typedef typename traits_type::int_type int_type;
70 typedef typename traits_type::pos_type pos_type;
71 typedef typename traits_type::off_type off_type;
73 typedef basic_streambuf<char_type, traits_type> __streambuf_type;
74 typedef basic_string<char_type, _Traits, _Alloc> __string_type;
75 typedef typename __string_type::size_type __size_type;
110 { _M_stringbuf_init(__mode); }
156 _M_stringbuf_init(ios_base::openmode __mode)
159 __size_type __len = 0;
161 __len = _M_string.
size();
162 _M_sync(const_cast<char_type*>(_M_string.
data()), 0, __len);
181 pbackfail(int_type __c = traits_type::eof());
184 overflow(int_type __c = traits_type::eof());
197 virtual __streambuf_type*
211 _M_sync(__s, __n, 0);
217 seekoff(off_type __off, ios_base::seekdir __way,
228 _M_sync(char_type*
__base, __size_type __i, __size_type __o);
248 _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off);
262 template<
typename _CharT,
typename _Traits,
typename _Alloc>
263 class basic_istringstream :
public basic_istream<_CharT, _Traits>
267 typedef _CharT char_type;
268 typedef _Traits traits_type;
271 typedef _Alloc allocator_type;
272 typedef typename traits_type::int_type int_type;
273 typedef typename traits_type::pos_type pos_type;
274 typedef typename traits_type::off_type off_type;
277 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
278 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
279 typedef basic_istream<char_type, traits_type> __istream_type;
282 __stringbuf_type _M_stringbuf;
301 { this->
init(&_M_stringbuf); }
318 ios_base::openmode __mode = ios_base::in)
320 { this->
init(&_M_stringbuf); }
340 {
return const_cast<__stringbuf_type*
>(&_M_stringbuf); }
348 {
return _M_stringbuf.str(); }
358 { _M_stringbuf.str(__s); }
372 template <
typename _CharT,
typename _Traits,
typename _Alloc>
373 class basic_ostringstream :
public basic_ostream<_CharT, _Traits>
377 typedef _CharT char_type;
378 typedef _Traits traits_type;
381 typedef _Alloc allocator_type;
382 typedef typename traits_type::int_type int_type;
383 typedef typename traits_type::pos_type pos_type;
384 typedef typename traits_type::off_type off_type;
387 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
388 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
389 typedef basic_ostream<char_type, traits_type> __ostream_type;
392 __stringbuf_type _M_stringbuf;
411 { this->
init(&_M_stringbuf); }
430 { this->
init(&_M_stringbuf); }
450 {
return const_cast<__stringbuf_type*
>(&_M_stringbuf); }
458 {
return _M_stringbuf.str(); }
468 { _M_stringbuf.str(__s); }
482 template <
typename _CharT,
typename _Traits,
typename _Alloc>
483 class basic_stringstream :
public basic_iostream<_CharT, _Traits>
487 typedef _CharT char_type;
488 typedef _Traits traits_type;
491 typedef _Alloc allocator_type;
492 typedef typename traits_type::int_type int_type;
493 typedef typename traits_type::pos_type pos_type;
494 typedef typename traits_type::off_type off_type;
497 typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
498 typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
499 typedef basic_iostream<char_type, traits_type> __iostream_type;
502 __stringbuf_type _M_stringbuf;
519 { this->
init(&_M_stringbuf); }
536 { this->
init(&_M_stringbuf); }
556 {
return const_cast<__stringbuf_type*
>(&_M_stringbuf); }
564 {
return _M_stringbuf.str(); }
574 { _M_stringbuf.str(__s); }
577 _GLIBCXX_END_NAMESPACE_VERSION