Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

FS::FdStreambuf Class Reference

#include <FdStream.H>

List of all members.

Public Types

typedef std::streambuf::pos_type stream_pos_t
typedef std::streambuf::off_type stream_off_t
typedef std::ios_base::seekdir stream_seek_t
typedef std::ios_base::openmode stream_mode_t

Public Member Functions

 FdStreambuf ()
 FdStreambuf (int fd)
 FdStreambuf (const char *filename, stream_mode_t mode, mode_t prot=0644, bool create=true, bool replace=true)
 ~FdStreambuf ()
FdStreambufattach (int fd)
FdStreambufopen (const char *filename, stream_mode_t mode, mode_t prot=0644, bool create=true, bool replace=true)
bool is_open () const
int fd () const
FdStreambufclose ()
virtual stream_pos_t seekoff (stream_off_t offset, stream_seek_t way, stream_mode_t mode=(std::ios::in|std::ios::out))
stream_pos_t seekpos (stream_pos_t pos, stream_mode_t mode=(std::ios::in|std::ios::out))

Protected Member Functions

bool get_pos_to_fd_pos ()
int underflow ()
std::streamsize xsgetn (char *s, std::streamsize n)
int overflow (int c=EOF)
std::streamsize xsputn (const char *s, std::streamsize n)
int sync ()

Protected Attributes

int _fd
bool should_close
char * buffer
unsigned int buf_size
stream_mode_t mode


Member Typedef Documentation

typedef std::ios_base::openmode FS::FdStreambuf::stream_mode_t
 

Definition at line 43 of file FdStream.H.

typedef std::streambuf::off_type FS::FdStreambuf::stream_off_t
 

Definition at line 41 of file FdStream.H.

typedef std::streambuf::pos_type FS::FdStreambuf::stream_pos_t
 

Definition at line 40 of file FdStream.H.

typedef std::ios_base::seekdir FS::FdStreambuf::stream_seek_t
 

Definition at line 42 of file FdStream.H.


Constructor & Destructor Documentation

FS::FdStreambuf::FdStreambuf  )  [inline]
 

Definition at line 63 of file FdStream.H.

FS::FdStreambuf::FdStreambuf int  fd  ) 
 

FS::FdStreambuf::FdStreambuf const char *  filename,
stream_mode_t  mode,
mode_t  prot = 0644,
bool  create = true,
bool  replace = true
 

FS::FdStreambuf::~FdStreambuf  ) 
 


Member Function Documentation

FdStreambuf* FS::FdStreambuf::attach int  fd  ) 
 

Referenced by FS::FdStreamBase::attach().

FdStreambuf* FS::FdStreambuf::close  ) 
 

Referenced by FS::FdStreamBase::close(), FS::FdStreambuf::close(), and FS::FdStreambuf::~FdStreambuf().

int FS::FdStreambuf::fd  )  const [inline]
 

Definition at line 79 of file FdStream.H.

References _fd, and is_open().

Referenced by FS::FdStreamBase::fd().

bool FS::FdStreambuf::get_pos_to_fd_pos  )  [protected]
 

Referenced by FS::FdStreambuf::overflow(), and FS::FdStreambuf::seekoff().

bool FS::FdStreambuf::is_open  )  const [inline]
 

Definition at line 78 of file FdStream.H.

References _fd.

Referenced by fd(), FS::FdStreambuf::attach(), FS::FdStreambuf::close(), FS::FdStreambuf::overflow(), FS::FdStreambuf::underflow(), and FS::FdStreamBase::is_open().

FdStreambuf* FS::FdStreambuf::open const char *  filename,
stream_mode_t  mode,
mode_t  prot = 0644,
bool  create = true,
bool  replace = true
 

Referenced by FS::FdStreambuf::open(), and FS::FdStreamBase::open().

int FS::FdStreambuf::overflow int  c = EOF  )  [protected]
 

Referenced by FS::FdStreambuf::seekoff(), FS::FdStreambuf::sync(), FS::FdStreambuf::underflow(), and FS::FdStreambuf::xsputn().

virtual stream_pos_t FS::FdStreambuf::seekoff stream_off_t  offset,
stream_seek_t  way,
stream_mode_t  mode = (std::ios::in|std::ios::out)
[virtual]
 

Referenced by FS::FdStreambuf::seekpos().

stream_pos_t FS::FdStreambuf::seekpos stream_pos_t  pos,
stream_mode_t  mode = (std::ios::in|std::ios::out)
 

int FS::FdStreambuf::sync  )  [protected]
 

Referenced by FS::FdStreambuf::close().

int FS::FdStreambuf::underflow  )  [protected]
 

std::streamsize FS::FdStreambuf::xsgetn char *  s,
std::streamsize  n
[protected]
 

std::streamsize FS::FdStreambuf::xsputn const char *  s,
std::streamsize  n
[protected]
 


Member Data Documentation

int FS::FdStreambuf::_fd [protected]
 

Definition at line 46 of file FdStream.H.

Referenced by fd(), FS::FdStreambuf::attach(), FS::FdStreambuf::close(), FS::FdStreambuf::open(), FS::FdStreambuf::overflow(), FS::FdStreambuf::underflow(), FS::FdStreambuf::xsgetn(), FS::FdStreambuf::xsputn(), and is_open().

unsigned int FS::FdStreambuf::buf_size [protected]
 

Definition at line 54 of file FdStream.H.

Referenced by FS::FdStreambuf::overflow(), FS::FdStreambuf::underflow(), and FS::FdStreambuf::xsputn().

char* FS::FdStreambuf::buffer [protected]
 

Definition at line 53 of file FdStream.H.

Referenced by FS::FdStreambuf::overflow(), FS::FdStreambuf::underflow(), FS::FdStreambuf::xsputn(), and FS::FdStreambuf::~FdStreambuf().

stream_mode_t FS::FdStreambuf::mode [protected]
 

Definition at line 55 of file FdStream.H.

Referenced by FS::FdStreambuf::attach(), FS::FdStreambuf::overflow(), and FS::FdStreambuf::underflow().

bool FS::FdStreambuf::should_close [protected]
 

Definition at line 50 of file FdStream.H.

Referenced by FS::FdStreambuf::attach(), FS::FdStreambuf::close(), and FS::FdStreambuf::open().


The documentation for this class was generated from the following file:
Generated on Mon May 8 00:49:18 2006 for Vesta by  doxygen 1.4.2