libstdc++
|
Public Types | |
typedef __string_type::size_type | __size_type |
typedef basic_streambuf< char_type, traits_type > | __streambuf_type |
typedef basic_string< char_type, _Traits, _Alloc > | __string_type |
typedef _Alloc | allocator_type |
typedef _CharT | char_type |
typedef traits_type::int_type | int_type |
typedef traits_type::off_type | off_type |
typedef traits_type::pos_type | pos_type |
typedef _Traits | traits_type |
Public Member Functions | |
basic_stringbuf () | |
basic_stringbuf (basic_stringbuf &&__rhs) | |
basic_stringbuf (const __string_type &__str, ios_base::openmode __mode=ios_base::in|ios_base::out) | |
basic_stringbuf (const basic_stringbuf &)=delete | |
basic_stringbuf (ios_base::openmode __mode) | |
basic_stringbuf & | operator= (basic_stringbuf &&__rhs) |
basic_stringbuf & | operator= (const basic_stringbuf &)=delete |
__string_type | str () const |
void | str (const __string_type &__s) |
void | swap (basic_stringbuf &__rhs) |
Protected Member Functions | |
void | _M_pbump (char_type *__pbeg, char_type *__pend, off_type __off) |
void | _M_stringbuf_init (ios_base::openmode __mode) |
void | _M_sync (char_type *__base, __size_type __i, __size_type __o) |
void | _M_update_egptr () |
virtual int_type | overflow (int_type __c=traits_type::eof()) |
virtual int_type | pbackfail (int_type __c=traits_type::eof()) |
virtual pos_type | seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out) |
virtual pos_type | seekpos (pos_type __sp, ios_base::openmode __mode=ios_base::in|ios_base::out) |
virtual __streambuf_type * | setbuf (char_type *__s, streamsize __n) |
virtual streamsize | showmanyc () |
virtual int_type | underflow () |
Protected Attributes | |
ios_base::openmode | _M_mode |
__string_type | _M_string |
The actual work of input and output (for std::string).
_CharT | Type of character stream. |
_Traits | Traits for character type, defaults to char_traits<_CharT>. |
_Alloc | Allocator type, defaults to allocator<_CharT>. |
This class associates either or both of its input and output sequences with a sequence of characters, which can be initialized from, or made available as, a std::basic_string
. (Paraphrased from [27.7.1]/1.)
For this class, open modes (of type ios_base::openmode
) have in
set if the input sequence can be read, and out
set if the output sequence can be written.
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineprotectedvirtual |
Manipulates the buffer.
__s | Pointer to a buffer area. |
__n | Size of __s. |
this
If no buffer has already been created, and both __s and __n are non-zero, then __s
is used as a buffer; see https://gcc.gnu.org/onlinedocs/libstdc++/manual/streambufs.html#io.streambuf.buffering for more.
|
inline |
|
inline |
|
protected |