|
PLearn 0.1
|
#include <pl_fdstream.h>


Public Member Functions | |
| pl_fdstream () | |
| pl_fdstream (int fd, int inbufsize=pl_dftbuflen, int outbufsize=pl_dftbuflen) | |
| void | init (int fd, int inbufsize=pl_dftbuflen, int outbufsize=pl_dftbuflen) |
| void | attach (int fd) |
| for compatibility with old non-standard stl fstream | |
| ~pl_fdstream () | |
Protected Attributes | |
| char * | outbuffer |
Definition at line 91 of file pl_fdstream.h.
| PLearn::pl_fdstream::pl_fdstream | ( | ) | [inline] |
Definition at line 98 of file pl_fdstream.h.
| PLearn::pl_fdstream::pl_fdstream | ( | int | fd, |
| int | inbufsize = pl_dftbuflen, |
||
| int | outbufsize = pl_dftbuflen |
||
| ) | [inline] |
Definition at line 102 of file pl_fdstream.h.
| PLearn::pl_fdstream::~pl_fdstream | ( | ) |
Definition at line 191 of file pl_fdstream.cc.
References PLearn::flush(), and outbuffer.

| void PLearn::pl_fdstream::attach | ( | int | fd | ) |
for compatibility with old non-standard stl fstream
Definition at line 179 of file pl_fdstream.cc.
References outbuffer, and PLearn::pl_dftbuflen.
{
rdbuf(new pl_fdstreambuf(fd, pl_dftbuflen));
outbuffer= new char[pl_dftbuflen];
#if __GNUC__ < 3 && !defined(WIN32)
rdbuf()->setbuf(outbuffer, pl_dftbuflen);
#else
rdbuf()->pubsetbuf(outbuffer, pl_dftbuflen);
#endif
}
| void PLearn::pl_fdstream::init | ( | int | fd, |
| int | inbufsize = pl_dftbuflen, |
||
| int | outbufsize = pl_dftbuflen |
||
| ) |
Definition at line 159 of file pl_fdstream.cc.
References outbuffer.
{
rdbuf(new pl_fdstreambuf(fd, inbufsize));
if(outbufsize<=1)
#if __GNUC__ < 3 && !defined(WIN32)
rdbuf()->setbuf(0,0);
#else
rdbuf()->pubsetbuf(0,0);
#endif
else
{
outbuffer = new char[outbufsize];
#if __GNUC__ < 3 && !defined(WIN32)
rdbuf()->setbuf(outbuffer,outbufsize);
#else
rdbuf()->pubsetbuf(outbuffer,outbufsize);
#endif
}
}
char* PLearn::pl_fdstream::outbuffer [protected] |
Definition at line 94 of file pl_fdstream.h.
Referenced by attach(), init(), and ~pl_fdstream().
1.7.4