Panda3D
|
A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string. More...
#include "stringStream.h"
Public Member Functions | |
StringStream (const string &source) | |
This version of the constructor preloads the buffer with the indicated data. More... | |
void | clear_data () |
Empties the buffer. More... | |
string | get_data () |
Returns the contents of the data stream as a string. More... | |
size_t | get_data_size () |
Returns the number of characters available to be read from the data stream. More... | |
void | set_data (const string &data) |
Replaces the contents of the data stream. More... | |
void | swap_data (pvector< unsigned char > &data) |
Swaps the indicated buffer for the contents of the internal buffer. More... | |
A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string.
Definition at line 27 of file stringStream.h.
|
inline |
This version of the constructor preloads the buffer with the indicated data.
Definition at line 32 of file stringStream.I.
References clear_data(), and set_data().
|
inline |
Empties the buffer.
Definition at line 42 of file stringStream.I.
References StringStreamBuf::clear(), and get_data_size().
Referenced by StringStream().
|
inline |
Returns the contents of the data stream as a string.
Definition at line 64 of file stringStream.I.
References StringStreamBuf::get_data(), and set_data().
Referenced by get_data_size().
|
inline |
Returns the number of characters available to be read from the data stream.
Definition at line 53 of file stringStream.I.
References get_data(), and StringStreamBuf::get_data().
Referenced by clear_data().
|
inline |
Replaces the contents of the data stream.
This implicitly reseeks to 0.
Definition at line 80 of file stringStream.I.
References StringStreamBuf::clear(), StringStreamBuf::swap_data(), and swap_data().
Referenced by get_data(), and StringStream().
|
inline |
Swaps the indicated buffer for the contents of the internal buffer.
Definition at line 96 of file stringStream.I.
References StringStreamBuf::swap_data().
Referenced by set_data().