Name
strstreambuf class — I/O buffer for character array streams
Synopsis
class strstreambuf : public basic_streambuf<char> { public: explicit strstreambuf(streamsize alsize_arg = 0); strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*)); strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = 0); strstreambuf(const char* gnext_arg, streamsize n); strstreambuf(signed char* gnext_arg, streamsize n, signed char* pbeg_arg = 0); strstreambuf(const signed char* gnext_arg, streamsize n); strstreambuf(unsigned char* gnext_arg, streamsize n, unsigned char* pbeg_arg = 0); strstreambuf(const unsigned char* gnext_arg, streamsize n); virtual ~strstreambuf( ); void freeze(bool freezefl = true); char* str( ); int pcount( ); protected: virtual int_type overflow (int_type c = EOF); virtual int_type pbackfail(int_type c = EOF); virtual int_type underflow( ); virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out); virtual pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out); };
The strstreambuf
class
implements a stream buffer for character array streams. An internal
buffer maintains a single character array with separate positions
for reading and writing. That is, the buffer has begin, next, and end pointers for reading and separate
begin, next, and end pointers for writing. The begin pointer points to the start of a
buffer, and the end pointer points to one past the end of the buffer. ...
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.