libdap::fpinbuf Class Reference

#include <fdiostream.h>

Inheritance diagram for libdap::fpinbuf:

Inheritance graph
[legend]
Collaboration diagram for libdap::fpinbuf:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 fpinbuf (FILE *_fp, bool _close)
virtual ~fpinbuf ()

Protected Member Functions

virtual int underflow ()

Protected Attributes

char buffer [bufferSize]
bool close
FILE * fp

Static Protected Attributes

static const int bufferSize = 4096
static const int putBack = 128

Detailed Description

fpintbuf is a stream buffer specialization designed specifically for files that are referenced using an open FILE pointer. This class implements a 4k buffer for data and optionally closes the file when the buffer is deleted. The stream buffer has 128 characters of 'put back' space.

Note:
Instead of using this class, use fpistream.
See also:
fpistream

Definition at line 140 of file fdiostream.h.


Constructor & Destructor Documentation

libdap::fpinbuf::fpinbuf ( FILE *  _fp,
bool  _close 
)

Make a stream buffer for reading from an open file using a FILE pointer.

Parameters:
_fp The open FILE pointer
_close If true, close the open file when deleting the stream buffer. False by default.
See also:
fpistream

Definition at line 223 of file fdiostream.cc.

References buffer, and putBack.

libdap::fpinbuf::~fpinbuf (  )  [virtual]

Close the file if specified.

Definition at line 232 of file fdiostream.cc.

References close, and fp.


Member Function Documentation

int libdap::fpinbuf::underflow (  )  [protected, virtual]

Insert new characters into the buffer

Definition at line 239 of file fdiostream.cc.

References buffer, bufferSize, DBG, fp, and putBack.


Member Data Documentation

char libdap::fpinbuf::buffer[bufferSize] [protected]

Definition at line 146 of file fdiostream.h.

Referenced by fpinbuf(), and underflow().

const int libdap::fpinbuf::bufferSize = 4096 [static, protected]

Definition at line 144 of file fdiostream.h.

Referenced by underflow().

bool libdap::fpinbuf::close [protected]

Definition at line 143 of file fdiostream.h.

Referenced by ~fpinbuf().

FILE* libdap::fpinbuf::fp [protected]

Definition at line 142 of file fdiostream.h.

Referenced by underflow(), and ~fpinbuf().

const int libdap::fpinbuf::putBack = 128 [static, protected]

Definition at line 145 of file fdiostream.h.

Referenced by fpinbuf(), and underflow().


The documentation for this class was generated from the following files:
Generated on Wed Feb 10 16:10:37 2010 for libdap++ by  doxygen 1.4.7