Inheritance diagram for std::basic_stringbuf< _CharT, _Traits, _Alloc >:
Public Types | |
typedef _CharT | char_type |
typedef _Traits | traits_type |
typedef _Alloc | allocator_type |
typedef traits_type::int_type | int_type |
typedef traits_type::pos_type | pos_type |
typedef traits_type::off_type | off_type |
typedef basic_streambuf< char_type, traits_type > | __streambuf_type |
typedef basic_string< char_type, _Traits, _Alloc > | __string_type |
typedef __string_type::size_type | __size_type |
Public Member Functions | |
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 Member Functions | |
void | _M_stringbuf_init (ios_base::openmode __mode) |
virtual streamsize | showmanyc () |
Investigating the data available. | |
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. | |
void | _M_sync (char_type *__base, __size_type __i, __size_type __o) |
void | _M_update_egptr () |
Protected Attributes | |
ios_base::openmode | _M_mode |
__string_type | _M_string |
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 63 of file sstream.
|
Definition at line 84 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_stringbuf_init(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_sync(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::overflow(). |
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >. |
|
Definition at line 83 of file sstream. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::setbuf(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::str(). |
|
|
|
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 >. |
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >. |
|
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(). |
|
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(). |
|
Reimplemented from std::basic_streambuf< _CharT, _Traits >. |
|
Starts with an empty string buffer.
Definition at line 113 of file sstream. References std::ios_base::openmode. |
|
Starts with an existing string buffer.
Definition at line 126 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_stringbuf_init(), and std::ios_base::openmode. |
|
Definition at line 178 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::__size_type, std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_sync(), and std::ios_base::openmode. Referenced by std::basic_stringbuf< _CharT, _Traits, _Alloc >::basic_stringbuf(), and std::basic_stringbuf< _CharT, _Traits, _Alloc >::str(). |
|
|
|
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 76 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::__size_type, std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_sync(), std::basic_streambuf< _CharT, _Traits >::eback(), std::basic_streambuf< _CharT, _Traits >::epptr(), std::basic_streambuf< _CharT, _Traits >::gptr(), std::max(), std::min(), std::basic_streambuf< _CharT, _Traits >::pbase(), std::basic_streambuf< _CharT, _Traits >::pptr(), and std::basic_streambuf< _CharT, _Traits >::sputc(). |
|
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_streambuf< _CharT, _Traits >::eback(), std::basic_streambuf< _CharT, _Traits >::gbump(), and std::basic_streambuf< _CharT, _Traits >::gptr(). |
|
Alters the stream positions. Each derived class provides its own appropriate behavior.
Reimplemented from std::basic_streambuf< _CharT, _Traits >. Definition at line 136 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_update_egptr(), std::basic_streambuf< _CharT, _Traits >::eback(), std::basic_streambuf< _CharT, _Traits >::egptr(), std::basic_streambuf< _CharT, _Traits >::gbump(), std::basic_streambuf< _CharT, _Traits >::gptr(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::off_type, std::ios_base::openmode, std::basic_streambuf< _CharT, _Traits >::pbase(), std::basic_streambuf< _CharT, _Traits >::pbump(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::pos_type, std::basic_streambuf< _CharT, _Traits >::pptr(), and std::ios_base::seekdir. |
|
Alters the stream positions. Each derived class provides its own appropriate behavior.
Reimplemented from std::basic_streambuf< _CharT, _Traits >. Definition at line 183 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_update_egptr(), std::basic_streambuf< _CharT, _Traits >::eback(), std::basic_streambuf< _CharT, _Traits >::egptr(), std::basic_streambuf< _CharT, _Traits >::gbump(), std::basic_stringbuf< _CharT, _Traits, _Alloc >::off_type, std::ios_base::openmode, std::basic_streambuf< _CharT, _Traits >::pbase(), std::basic_streambuf< _CharT, _Traits >::pbump(), 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 >. Definition at line 224 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::__string_type, std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_sync(), and std::streamsize. |
|
Investigating the data available.
underflow() will not return traits::eof() until at least that number of characters have been supplied. If showmanyc() returns -1, then calls to underflow() or uflow() will fail." [27.5.2.4.3]/1
Reimplemented from std::basic_streambuf< _CharT, _Traits >. Definition at line 189 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_update_egptr(), std::basic_streambuf< _CharT, _Traits >::egptr(), std::basic_streambuf< _CharT, _Traits >::gptr(), and std::streamsize. |
|
Setting a new buffer.
Definition at line 163 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_stringbuf_init(). |
|
Copying out the string buffer.
Definition at line 141 of file sstream. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::__string_type, std::basic_streambuf< _CharT, _Traits >::egptr(), and std::basic_streambuf< _CharT, _Traits >::pptr(). Referenced by std::basic_istringstream< _CharT, _Traits, _Alloc >::str(). |
|
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 >. Definition at line 118 of file sstream.tcc. References std::basic_stringbuf< _CharT, _Traits, _Alloc >::_M_update_egptr(), std::basic_streambuf< _CharT, _Traits >::egptr(), and std::basic_streambuf< _CharT, _Traits >::gptr(). |
|
|
|
|