A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string in Python 2 or a bytes object in Python 3. More...
#include "stringStream.h"
Public Member Functions | |
| StringStream (const std::string &source) | |
| This version of the constructor preloads the buffer with the indicated data. More... | |
| void | clear_data () |
| Empties the buffer. More... | |
| std::string | get_data () |
| size_t | get_data_size () |
| Returns the number of characters available to be read from the data stream. More... | |
| void | set_data (const std::string &data) |
| void | set_data (const unsigned char *data, size_t size) |
| void | swap_data (vector_uchar &data) |
| Swaps the indicated buffer for the contents of the internal buffer. More... | |
Public Attributes | |
| get_data | |
| Returns the contents of the data stream as a string. More... | |
| set_data | |
| Replaces the contents of the data stream. More... | |
Friends | |
| class | Extension< StringStream > |
A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string in Python 2 or a bytes object in Python 3.
Definition at line 27 of file stringStream.h.
|
inline |
This version of the constructor preloads the buffer with the indicated data.
Definition at line 26 of file stringStream.I.
References set_data.
|
inline |
Empties the buffer.
Definition at line 34 of file stringStream.I.
References StringStreamBuf::clear().
|
inline |
Returns the number of characters available to be read from the data stream.
Definition at line 42 of file stringStream.I.
References StringStreamBuf::get_data().
|
inline |
Swaps the indicated buffer for the contents of the internal buffer.
Definition at line 75 of file stringStream.I.
|
inline |
Returns the contents of the data stream as a string.
Definition at line 42 of file stringStream.h.
|
inline |
Replaces the contents of the data stream.
This implicitly reseeks to 0.
Definition at line 42 of file stringStream.h.
Referenced by StringStream().
1.8.15