libebook::EBOOKStreamSlice Class Reference

A stream representing a slice of (or view into) another stream. More...

#include <EBOOKStreamSlice.h>

Inheritance diagram for libebook::EBOOKStreamSlice:

Public Member Functions

 EBOOKStreamSlice (WPXInputStream *stream, long begin, long end)
 
virtual ~EBOOKStreamSlice ()
 
virtual bool isOLEStream ()
 
virtual WPXInputStream * getDocumentOLEStream (const char *name)
 
virtual const unsigned char * read (unsigned long numBytes, unsigned long &numBytesRead)
 
virtual int seek (long offset, WPX_SEEK_TYPE seekType)
 
virtual long tell ()
 
virtual bool atEOS ()
 

Private Member Functions

 EBOOKStreamSlice (const EBOOKStreamSlice &other)
 
EBOOKStreamSliceoperator= (const EBOOKStreamSlice &other)
 

Private Attributes

WPXInputStream *const m_stream
 
const long m_begin
 
const long m_end
 

Detailed Description

A stream representing a slice of (or view into) another stream.

The purpose of this class is only to simplify reading of chunks of data from the original stream. All reading operations change the original stream. That means that it is not advisable to use the original stream while a slice of it is in use too.

Constructor & Destructor Documentation

libebook::EBOOKStreamSlice::EBOOKStreamSlice ( const EBOOKStreamSlice other)
private
libebook::EBOOKStreamSlice::EBOOKStreamSlice ( WPXInputStream *  stream,
long  begin,
long  end 
)
libebook::EBOOKStreamSlice::~EBOOKStreamSlice ( )
virtual

Member Function Documentation

bool libebook::EBOOKStreamSlice::atEOS ( )
virtual
WPXInputStream * libebook::EBOOKStreamSlice::getDocumentOLEStream ( const char *  name)
virtual
bool libebook::EBOOKStreamSlice::isOLEStream ( )
virtual
EBOOKStreamSlice& libebook::EBOOKStreamSlice::operator= ( const EBOOKStreamSlice other)
private
const unsigned char * libebook::EBOOKStreamSlice::read ( unsigned long  numBytes,
unsigned long &  numBytesRead 
)
virtual
int libebook::EBOOKStreamSlice::seek ( long  offset,
WPX_SEEK_TYPE  seekType 
)
virtual
long libebook::EBOOKStreamSlice::tell ( )
virtual

Member Data Documentation

const long libebook::EBOOKStreamSlice::m_begin
private

Referenced by EBOOKStreamSlice(), read(), seek(), and tell().

const long libebook::EBOOKStreamSlice::m_end
private

Referenced by atEOS(), read(), and seek().

WPXInputStream* const libebook::EBOOKStreamSlice::m_stream
private

Referenced by atEOS(), EBOOKStreamSlice(), read(), seek(), and tell().


The documentation for this class was generated from the following files:

Generated for libe-book by doxygen 1.8.5