#include <WPXMemoryStream.h>
Public Member Functions | |
WPXMemoryInputStream (unsigned char *data, unsigned long size) | |
virtual | ~WPXMemoryInputStream () |
virtual bool | isOLEStream () |
Analyses the content of the input stream to see whether it is an OLE2 storage. | |
virtual WPXInputStream * | getDocumentOLEStream (const char *) |
Extracts a PerfectOffice_MAIN stream from an OLE2 storage. | |
virtual const unsigned char * | read (unsigned long numBytes, unsigned long &numBytesRead) |
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) |
Moves to the next location inside the input stream. | |
virtual long | tell () |
Returns the actual position inside the input stream. | |
virtual bool | atEOS () |
Determines whether the current position is at the end of the stream. | |
virtual unsigned long | getSize () const |
Private Member Functions | |
WPXMemoryInputStream (const WPXMemoryInputStream &) | |
WPXMemoryInputStream & | operator= (const WPXMemoryInputStream &) |
Private Attributes | |
long | m_offset |
unsigned long | m_size |
unsigned char * | m_data |
WPXMemoryInputStream::WPXMemoryInputStream | ( | unsigned char * | data, |
unsigned long | size | ||
) |
WPXMemoryInputStream::~WPXMemoryInputStream | ( | ) | [virtual] |
WPXMemoryInputStream::WPXMemoryInputStream | ( | const WPXMemoryInputStream & | ) | [private] |
bool WPXMemoryInputStream::atEOS | ( | ) | [virtual] |
Determines whether the current position is at the end of the stream.
Implements WPXInputStream.
Referenced by WP6ExtendedDocumentSummaryPacket::parse().
virtual WPXInputStream* WPXMemoryInputStream::getDocumentOLEStream | ( | const char * | name | ) | [inline, virtual] |
Extracts a PerfectOffice_MAIN
stream from an OLE2 storage.
PerfectOffice_MAIN
stream if it exists. PerfectOffice_MAIN
stream does not exist inside the OLE2 storage or if the input stream is not an OLE2 storage. Implements WPXInputStream.
virtual unsigned long WPXMemoryInputStream::getSize | ( | ) | const [inline, virtual] |
virtual bool WPXMemoryInputStream::isOLEStream | ( | ) | [inline, virtual] |
Analyses the content of the input stream to see whether it is an OLE2 storage.
Implements WPXInputStream.
WPXMemoryInputStream& WPXMemoryInputStream::operator= | ( | const WPXMemoryInputStream & | ) | [private] |
const unsigned char * WPXMemoryInputStream::read | ( | unsigned long | numBytes, |
unsigned long & | numBytesRead | ||
) | [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. |
Implements WPXInputStream.
int WPXMemoryInputStream::seek | ( | long | offset, |
WPX_SEEK_TYPE | seekType | ||
) | [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). Implements WPXInputStream.
Referenced by WP1SubDocument::parse(), WP6SubDocument::parse(), WP3SubDocument::parse(), WP5SubDocument::parse(), WP42SubDocument::parse(), and WP6ExtendedDocumentSummaryPacket::parse().
long WPXMemoryInputStream::tell | ( | ) | [virtual] |
Returns the actual position inside the input stream.
Implements WPXInputStream.
unsigned char* WPXMemoryInputStream::m_data [private] |
Referenced by read().
long WPXMemoryInputStream::m_offset [private] |
unsigned long WPXMemoryInputStream::m_size [private] |