#include <WPXStream.h>
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 WPXInputStream * | getDocumentOLEStream ()=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 |
WPXInputStream::WPXInputStream | ( | bool | supportsOLE | ) | [inline] |
virtual WPXInputStream::~WPXInputStream | ( | ) | [inline, virtual] |
virtual bool WPXInputStream::isOLEStream | ( | ) | [pure virtual] |
Analyses the content of the input stream to see whether it is an OLE2 storage.
Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.
virtual WPXInputStream* WPXInputStream::getDocumentOLEStream | ( | ) | [pure virtual] |
Extracts a PerfectOffice_MAIN
stream from an OLE2 storage.
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 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.
numBytes | Number of bytes desired to be read. | |
numBytesRead | Number of bytes that were possible to be read. |
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.
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 ). |
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.
Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.
virtual bool WPXInputStream::atEOS | ( | ) | [pure virtual] |
Determines whether the current position is at the end of the stream.
Implemented in GSFInputStream, WPXMemoryInputStream, WPXFileStream, and WPXStringStream.
bool WPXInputStream::m_supportsOLE [private] |