69 setg (
char* gbeg_,
char* gnext_,
char* gend_)
80 setb (
char* b_,
char* eb_,
int del_)
100 setbuf (
char* p_,
int len_)
109 if (p_ == NULL || len_ == 0) {
118 setb (p_, p_ + len_, 0);
128 xsgetn (
char* data_,
int len_)
152 else if (count > 20) {
165 DL((
STRMBUFTRACE,
"Transferred %d bytes to user-space buffer\n", count));
184 xsputn (
const char* data_,
int len_)
188 const char* s = data_;
207 else if (count <= 0) {
214 for (i=count; --i >= 0;) {
222 if (more == 0 ||
overflow ((
unsigned char) *s++) == EOF) {
229 return (len_ - more);
239 buf =
new char [1024];
243 setb (buf, buf+1024, 1);
#define DL(X)
A macro for writing debug message to the Logger.
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
A Hex/Ascii memory dump of similar to od(1) UNIX utility.
Streambuf class is based on Standard C++ iostream streambuf class.
const char * getMemDump() const
Obtain a pointer to the dump image (null-terminated char string).
virtual int underflow()
This function is called to supply characters for input (from some source) when the get area is empty,...
void setp(char *pbeg_, char *pend_)
Set put area pointers.
virtual Streambuf * setbuf(char *p_, int len_)
Performs an operation that is defined separately for each class derived from Streambuf.
virtual int overflow(int c=EOF)
This function is called to consume characters (flush them to output), typically when the put area is ...
virtual int doallocate()
This function is called by allocate when unbuffered() is zero and base() is zero.
virtual int xsgetn(char *b_, int len_)
Assigns up to len_ characters to successive elements of the array whose first element is designated b...
virtual int uflow()
Reads the characters from the input sequence, if possible, and moves the stream position past it,...
void setb(char *b_, char *eb_, int del_)
Establish the reserve area (buffer).
virtual int sync()
This function synchronizes the streambuf with its actual stream of characters.
int sgetc()
This function returns the character after the get pointer, or EOF if the get pointer is at the end of...
void setg(char *gbeg_, char *gnext_, char *gend_)
Set get area pointers.
virtual int xsputn(const char *b_, int len_)
Writes up to len_ characters to the output sequence as if by repeated calls to sputc (c).
int snextc()
This function moves the get pointer forward one position, then returns the character after the get ...
@ STRMBUFTRACE
Extended Streambuf & friends messages
@ STRMBUF
Class Streambuf & friends messages