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

SubStreamBuf Class Reference

The streambuf object that implements ISubStream. More...

#include <subStreamBuf.h>

List of all members.

Public Member Functions

 SubStreamBuf ()
virtual ~SubStreamBuf ()
void open (istream *source, streampos start, streampos end)
void close ()
virtual streampos seekoff (streamoff off, ios_seekdir dir, ios_openmode mode)
 Implements seeking within the stream.

virtual streampos seekpos (streampos pos, ios_openmode mode)
 A variant on seekoff() to implement seeking within a stream.


Protected Member Functions

virtual int overflow (int c)
 Called by the system ostream implementation when its internal buffer is filled, plus one character.

virtual int sync (void)
 Called by the system iostream implementation to implement a flush operation.

virtual int underflow (void)
 Called by the system istream implementation when its internal buffer needs more characters.


Private Attributes

istream * _source
streampos _start
streampos _end
streampos _cur
size_t _unused


Detailed Description

The streambuf object that implements ISubStream.

Definition at line 34 of file subStreamBuf.h.


Constructor & Destructor Documentation

SubStreamBuf::SubStreamBuf  ) 
 

Definition at line 65 of file subStreamBuf.cxx.

SubStreamBuf::~SubStreamBuf  )  [virtual]
 

Definition at line 112 of file subStreamBuf.cxx.

References _cur, _end, _source, _start, and _unused.


Member Function Documentation

void SubStreamBuf::close  ) 
 

Definition at line 142 of file subStreamBuf.cxx.

References _cur, and size_t.

void SubStreamBuf::open istream *  source,
streampos  start,
streampos  end
 

Definition at line 124 of file subStreamBuf.cxx.

References _cur, _end, _source, _start, _unused, and NULL.

Referenced by ISubStream::ISubStream().

int SubStreamBuf::overflow int  c  )  [protected, virtual]
 

Called by the system ostream implementation when its internal buffer is filled, plus one character.

Definition at line 255 of file subStreamBuf.cxx.

streampos SubStreamBuf::seekoff streamoff  off,
ios_seekdir  dir,
ios_openmode  mode
[virtual]
 

Implements seeking within the stream.

Definition at line 159 of file subStreamBuf.cxx.

References _end, _source, _start, grab_lock(), and release_lock().

streampos SubStreamBuf::seekpos streampos  pos,
ios_openmode  mode
[virtual]
 

A variant on seekoff() to implement seeking within a stream.

The MSDN Library claims that it is only necessary to redefine seekoff(), and not seekpos() as well, as the default implementation of seekpos() is supposed to map to seekoff() exactly as I am doing here; but in fact it must do something else, because seeking didn't work on Windows until I redefined this function as well.

Definition at line 240 of file subStreamBuf.cxx.

int SubStreamBuf::sync void   )  [protected, virtual]
 

Called by the system iostream implementation to implement a flush operation.

Definition at line 271 of file subStreamBuf.cxx.

References _end, _source, _unused, and size_t.

int SubStreamBuf::underflow void   )  [protected, virtual]
 

Called by the system istream implementation when its internal buffer needs more characters.

Definition at line 289 of file subStreamBuf.cxx.

References size_t.


Member Data Documentation

streampos SubStreamBuf::_cur [private]
 

Definition at line 54 of file subStreamBuf.h.

Referenced by close(), open(), and ~SubStreamBuf().

streampos SubStreamBuf::_end [private]
 

Definition at line 53 of file subStreamBuf.h.

Referenced by open(), seekoff(), sync(), and ~SubStreamBuf().

istream* SubStreamBuf::_source [private]
 

Definition at line 51 of file subStreamBuf.h.

Referenced by open(), seekoff(), sync(), and ~SubStreamBuf().

streampos SubStreamBuf::_start [private]
 

Definition at line 52 of file subStreamBuf.h.

Referenced by open(), seekoff(), and ~SubStreamBuf().

size_t SubStreamBuf::_unused [private]
 

Definition at line 55 of file subStreamBuf.h.

Referenced by open(), sync(), and ~SubStreamBuf().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:55:20 2003 for Panda by doxygen1.3