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

WPXInputStream Class Reference

#include <WPXStream.h>

Inheritance diagram for WPXInputStream:

GSFInputStream WPXFileStream WPXMemoryInputStream WPXStringStream List of all members.

Public Member Functions

 WPXInputStream (bool supportsOLE)
virtual ~WPXInputStream ()
virtual bool isOLEStream ()=0
 Analyses the content of the input stream to see whether it is an OLE2 storage.

virtual WPXInputStreamgetDocumentOLEStream ()=0
 Extracts a PerfectOffice_MAIN stream from an OLE2 storage.

virtual const uint8_t * read (size_t numBytes, size_t &numBytesRead)=0
 Tries to read a given number of bytes starting from the current position inside the input stream.

virtual int seek (long offset, WPX_SEEK_TYPE seekType)=0
 Moves to the next location inside the input stream.

virtual long tell ()=0
 Returns the actual position inside the input stream.

virtual bool atEOS ()=0
 Determines whether the current position is at the end of the stream.


Private Attributes

bool m_supportsOLE

Constructor & Destructor Documentation

WPXInputStream::WPXInputStream bool  supportsOLE  )  [inline]
 

virtual WPXInputStream::~WPXInputStream  )  [inline, virtual]
 


Member Function Documentation

virtual bool WPXInputStream::atEOS  )  [pure virtual]
 

Determines whether the current position is at the end of the stream.

Returns:
A boolean value that should be true if the next location to be read in the input stream is beyond its end. In all other cases, it should be false.

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.

virtual WPXInputStream* WPXInputStream::getDocumentOLEStream  )  [pure virtual]
 

Extracts a PerfectOffice_MAIN stream from an OLE2 storage.

Returns:
Should be a pointer to WPXInputStream constructed from the PerfectOffice_MAIN stream if it exists.

Should be 0, if the PerfectOffice_MAIN stream does not exist inside the OLE2 storage or if the input stream is not an OLE2 storage.

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.

virtual bool WPXInputStream::isOLEStream  )  [pure virtual]
 

Analyses the content of the input stream to see whether it is an OLE2 storage.

Returns:
A boolean value that should be true if the input stream is an OLE2 storage and false if it is not the case

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.

virtual const uint8_t* WPXInputStream::read size_t  numBytes,
size_t &  numBytesRead
[pure virtual]
 

Tries to read a given number of bytes starting from the current position inside the input stream.

Parameters:
numBytes Number of bytes desired to be read.
numBytesRead Number of bytes that were possible to be read.
Returns:
Should be a pointer to an array of numBytesRead bytes (uint8_t[numBytesRead]).

Optionally it could be 0 if the desired number of bytes could not be read.

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.

virtual int WPXInputStream::seek long  offset,
WPX_SEEK_TYPE  seekType
[pure virtual]
 

Moves to the next location inside the input stream.

Parameters:
offset The offset of the location inside the input stream to move to. It is relative either to the current position or to the beginning of the input stream depending on the value of the seekType parameter.
seekType Determines whether the offset is relative to the beginning of the input stream (WPX_SEEK_SET) or to the current position (WPX_SEEK_CUR).
Returns:
An integer value that should be 0 (zero) if the seek was successful and any other value if it failed (i.e. the requested offset is beyond the end of the input stream or before its beginning).

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.

virtual long WPXInputStream::tell  )  [pure virtual]
 

Returns the actual position inside the input stream.

Returns:
A long integer value that should correspond to the position of the next location to be read in the input stream.

Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.


Member Data Documentation

bool WPXInputStream::m_supportsOLE [private]
 


The documentation for this class was generated from the following file:
Generated on Sat Aug 20 05:20:58 2022 for libwpd by doxygen 1.3.5