Used by StringStream to implement an stream that reads from and/or writes to a memory buffer, whose contents can be appended to or extracted at any time by application code. More...
#include "stringStreamBuf.h"
Public Member Functions | |
void | clear () |
Empties the buffer. More... | |
const vector_uchar & | get_data () const |
Returns a reference to the contents of the internal buffer, without any of the iostream buffer. More... | |
size_t | read_chars (char *start, size_t length) |
Attempts to extract the indicated number of characters from the current file position. More... | |
void | swap_data (vector_uchar &data) |
Swaps the indicated buffer for the contents of the internal buffer. More... | |
void | write_chars (const char *start, size_t length) |
Appends the indicated stream of characters to the current file position. More... | |
Used by StringStream to implement an stream that reads from and/or writes to a memory buffer, whose contents can be appended to or extracted at any time by application code.
Definition at line 25 of file stringStreamBuf.h.
void StringStreamBuf::clear | ( | ) |
Empties the buffer.
Definition at line 63 of file stringStreamBuf.cxx.
Referenced by StringStream::clear_data().
|
inline |
Returns a reference to the contents of the internal buffer, without any of the iostream buffer.
Definition at line 28 of file stringStreamBuf.I.
Referenced by StringStream::get_data_size().
size_t StringStreamBuf::read_chars | ( | char * | start, |
size_t | length | ||
) |
Attempts to extract the indicated number of characters from the current file position.
Returns the number of characters extracted.
Definition at line 77 of file stringStreamBuf.cxx.
|
inline |
Swaps the indicated buffer for the contents of the internal buffer.
Does not affect the ppos or gpos, or the iostream buffer.
Definition at line 19 of file stringStreamBuf.I.
void StringStreamBuf::write_chars | ( | const char * | start, |
size_t | length | ||
) |
Appends the indicated stream of characters to the current file position.
Definition at line 99 of file stringStreamBuf.cxx.