In file fdstream/fdstream.hh:

template <class charT, class traits = char_traits <charT> > class basic_fdbuf : public basic_streambuf <charT, traits>

Basic file descriptors stream buffer

Inheritance:


Public Methods

basic_fdbuf (int fdin, int fdout)
Constructor

Protected Fields

int fFdIn
Inpput file descriptor
int fFdOut
Inpput file descriptor
static const streamsize fBufferSize
size of input data buffer
char_type fBuffer [fBufferSize]
Input data buffer

Protected Methods

virtual int_type underflow ()
Read one character
virtual int_type overflow (int_type c = traits::eof())
Write one character
virtual streamsize xsputn (const char_type* s, streamsize num)
Write multiple characters
virtual pos_type seekoff (off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out)
Seek with offset
virtual pos_type seekpos (pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out)
Seek with position
static streamsize fdread (int fd, char_type* s, streamsize num)
file descriptor read
static streamsize fdwrite (int fd, const char_type* s, streamsize num)
file descriptor write
static pos_type fdseek (int fd, off_type off, ios_base::seekdir way)
file descriptor seek

Documentation

Basic stream buffer with file descriptors.

basic_fdbuf(int fdin, int fdout)
Constructor. Create a streambuf from open file descriptors. The first descriptor will be used for input whereas the second is used for output. If one of the is not used, set it to -1.

int fFdIn
Inpput file descriptor

int fFdOut
Inpput file descriptor

static const streamsize fBufferSize
size of input data buffer

char_type fBuffer[fBufferSize]
Input data buffer

virtual int_type underflow()
Read one character

virtual int_type overflow(int_type c = traits::eof())
Write one character

virtual streamsize xsputn(const char_type* s, streamsize num)
Write multiple characters

virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out)
Seek with offset

virtual pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out)
Seek with position

static streamsize fdread(int fd, char_type* s, streamsize num)
file descriptor read

static streamsize fdwrite(int fd, const char_type* s, streamsize num)
file descriptor write

static pos_type fdseek(int fd, off_type off, ios_base::seekdir way)
file descriptor seek


This class has no child classes.

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++