#include <fdiostream.h>
Inheritance diagram for libdap::fdoutbuf:
Public Member Functions | |
fdoutbuf (int _fd, bool _close) | |
virtual | ~fdoutbuf () |
Protected Member Functions | |
int | flushBuffer () |
virtual int | overflow (int c) |
virtual int | sync () |
virtual std::streamsize | xsputn (const char *s, std::streamsize num) |
Protected Attributes | |
char | buffer [bufferSize] |
bool | close |
int | fd |
Static Protected Attributes | |
static const int | bufferSize = 4096 |
Definition at line 50 of file fdiostream.h.
libdap::fdoutbuf::fdoutbuf | ( | int | _fd, | |
bool | _close | |||
) |
Make an instance of fdoutbuf. To write to a file using an open file descriptor, use fdostream instead.
_fd | The open file descriptor | |
_close | If true, close the file when the stream buffer is deleted. False by default. |
Definition at line 44 of file fdiostream.cc.
References buffer, and bufferSize.
libdap::fdoutbuf::~fdoutbuf | ( | ) | [virtual] |
int libdap::fdoutbuf::flushBuffer | ( | ) | [protected] |
Definition at line 60 of file fdiostream.cc.
References buffer.
Referenced by overflow(), and sync().
int libdap::fdoutbuf::overflow | ( | int | c | ) | [protected, virtual] |
Buffer full, write c and all previous characters
Definition at line 71 of file fdiostream.cc.
References flushBuffer().
Here is the call graph for this function:
int libdap::fdoutbuf::sync | ( | ) | [protected, virtual] |
synchronize with file/destination
Definition at line 87 of file fdiostream.cc.
References flushBuffer().
Referenced by ~fdoutbuf().
Here is the call graph for this function:
std::streamsize libdap::fdoutbuf::xsputn | ( | const char * | s, | |
std::streamsize | num | |||
) | [protected, virtual] |
char libdap::fdoutbuf::buffer[bufferSize] [protected] |
const int libdap::fdoutbuf::bufferSize = 4096 [static, protected] |
bool libdap::fdoutbuf::close [protected] |
int libdap::fdoutbuf::fd [protected] |