Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

fpbase Class Reference

Base class for handling streamable objects on file streams. More...

#include <tobjstrm.h>

Inheritance diagram for fpbase::

pstream fpstream ifpstream ofpstream List of all members.

Public Methods

 fpbase ()
 fpbase (const char *name, int omode, int prot=filebuf::openprot)
 fpbase (int f)
 fpbase (int f, char *b, int len)
 ~fpbase ()
void open (const char *name, int omode, int prot=filebuf::openprot)
void attach (int f)
void close ()
void setbuf (char *buf, int len)
filebuf* rdbuf ()

Detailed Description

fpbase provides the basic operations common to all object file stream I/O.

Definition at line 959 of file tobjstrm.h.


Constructor & Destructor Documentation

fpbase::fpbase ( )
 

Creates a buffered fpbase object.

fpbase::fpbase ( const char * name,
int omode,
int prot = filebuf::openprot )
 

Creates a buffered fpbase object. You can open a file and attach it to the stream by specifying the `name', `omode', and `prot' (protection) arguments.

fpbase::fpbase ( int f )
 

Creates a buffered fpbase object. You can open a file and attach it to the stream by specifying the file descriptor, `f'.

fpbase::fpbase ( int f,
char * b,
int len )
 

Creates a buffered fpbase object. You can set the size and initial contents of the buffer with the `len' and `b' arguments. You can open a file and attach it to the stream by specifying the file descriptor, `f'.

fpbase::~fpbase ( )
 

Destroys the fpbase object.


Member Function Documentation

void fpbase::attach ( int f )
 

Attaches the file with descriptor `f' to this stream if possible.

void fpbase::close ( )
 

Closes the stream and associated file.

void fpbase::open ( const char * name,
int omode,
int prot = filebuf::openprot )
 

Opens the named file in the given mode (app, ate, in, out, binary, trunc, nocreate, noreplace) and protection. The opened file is attached to this stream.

Reimplemented in ifpstream, ofpstream, and fpstream.

filebuf * fpbase::rdbuf ( )
 

Returns a pointer to the current file buffer.

Reimplemented in ifpstream, ofpstream, and fpstream.

void fpbase::setbuf ( char * buf,
int len )
 

Allocates a buffer of size `len'.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:25 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001