Inheritance diagram for std::basic_stringbuf< _CharT, _Traits, _Alloc >:
Public Types | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef traits_type::int_type | int_type |
typedef traits_type::pos_type | pos_type |
typedef traits_type::off_type | off_type |
Public Methods | |
basic_stringbuf (ios_base::openmode __mode=ios_base::in|ios_base::out) | |
Starts with an empty string buffer. | |
basic_stringbuf (const __string_type &__str, ios_base::openmode __mode=ios_base::in|ios_base::out) | |
Starts with an existing string buffer. | |
__string_type | str () const |
Copying out the string buffer. | |
void | str (const __string_type &__s) |
Setting a new buffer. | |
Protected Methods | |
virtual int_type | underflow () |
Fetches more data from the controlled sequence. | |
virtual int_type | pbackfail (int_type __c=traits_type::eof()) |
Tries to back up the input sequence. | |
virtual int_type | overflow (int_type __c=traits_type::eof()) |
Consumes data from the buffer; writes to the controlled sequence. | |
virtual __streambuf_type * | setbuf (char_type *__s, streamsize __n) |
Manipulates the buffer. | |
virtual pos_type | seekoff (off_type __off, ios_base::seekdir __way, ios_base::openmode __mode=ios_base::in|ios_base::out) |
Alters the stream positions. | |
virtual pos_type | seekpos (pos_type __sp, ios_base::openmode __mode=ios_base::in|ios_base::out) |
Alters the stream positions. |
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.
Definition at line 62 of file sstream.
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 66 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos() . |
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 72 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::pbackfail() . |
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 74 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos() . |
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 73 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekoff() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::seekpos() . |
|
These are standard types. They permit a standardized way of referring to names of (or names dependant on) the template parameters, which are specific to the implementation. Reimplemented from std::basic_streambuf< _CharT, _Traits > . |
|
Starts with an empty string buffer.
|
|
Starts with an existing string buffer.
|
|
Consumes data from the buffer; writes to the controlled sequence.
eof().
For a formal definiton of this function, see a good text such as Langer & Kreft, or [27.5.2.4.5]/3-7. A functioning output streambuf can be created by overriding only this function (no buffer area will be used).
Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 81 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::int_type , std::max() , std::basic_streambuf< _CharT, _Traits >::sputc() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::str() . |
|
Tries to back up the input sequence.
Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 47 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::int_type . |
|
Alters the stream positions. Each derived class provides its own appropriate behavior.
Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 121 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::char_type , std::basic_streambuf< _CharT, _Traits >::egptr() , std::basic_streambuf< _CharT, _Traits >::epptr() , std::basic_streambuf< _CharT, _Traits >::gptr() , std::basic_stringbuf< _CharT, _Traits, _Alloc >::off_type , std::basic_stringbuf< _CharT, _Traits, _Alloc >::pos_type , and std::basic_streambuf< _CharT, _Traits >::pptr() . |
|
Alters the stream positions. Each derived class provides its own appropriate behavior.
Reimplemented from std::basic_streambuf< _CharT, _Traits > . Definition at line 181 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::char_type , std::basic_streambuf< _CharT, _Traits >::eback() , std::basic_streambuf< _CharT, _Traits >::egptr() , std::basic_stringbuf< _CharT, _Traits, _Alloc >::off_type , std::basic_streambuf< _CharT, _Traits >::pbase() , and std::basic_stringbuf< _CharT, _Traits, _Alloc >::pos_type . |
|
Manipulates the buffer.
s is used as a buffer; see http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#2 for more.
Reimplemented from std::basic_streambuf< _CharT, _Traits > . |
|
Setting a new buffer.
|
|
Copying out the string buffer.
Definition at line 136 of file sstream. References std::max() . Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow() . |
|
Fetches more data from the controlled sequence.
traits::eof() to indicate a null pending sequence.
For a formal definiton of the pending sequence, see a good text such as Langer & Kreft, or [27.5.2.4.3]/7-14. A functioning input streambuf can be created by overriding only this function (no buffer area will be used). For an example, see http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#6
Reimplemented from std::basic_streambuf< _CharT, _Traits > . |