WPXStringStream Class Reference

#include <WPXStreamImplementation.h>

Inheritance diagram for WPXStringStream:
WPXInputStream

List of all members.

Public Member Functions

 WPXStringStream (const char *data, const unsigned int dataSize)
 ~WPXStringStream ()
const uint8_t * read (size_t numBytes, size_t &numBytesRead)
 Tries to read a given number of bytes starting from the current position inside the input stream.
long tell ()
 Returns the actual position inside the input stream.
int seek (long offset, WPX_SEEK_TYPE seekType)
 Moves to the next location inside the input stream.
bool atEOS ()
 Determines whether the current position is at the end of the stream.
bool isOLEStream ()
 Analyses the content of the input stream to see whether it is an OLE2 storage.
WPXInputStreamgetDocumentOLEStream (const char *name)
WPXInputStreamgetDocumentOLEStream ()
 Extracts a PerfectOffice_MAIN stream from an OLE2 storage.

Private Member Functions

 WPXStringStream (const WPXStringStream &)
WPXStringStreamoperator= (const WPXStringStream &)

Private Attributes

WPXStringStreamPrivated

Constructor & Destructor Documentation

WPXStringStream::WPXStringStream ( const char *  data,
const unsigned int  dataSize 
)

Referenced by getDocumentOLEStream().

WPXStringStream::~WPXStringStream (  ) 
WPXStringStream::WPXStringStream ( const WPXStringStream  )  [private]

Member Function Documentation

bool WPXStringStream::atEOS (  )  [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.

Implements WPXInputStream.

Referenced by read().

WPXInputStream * WPXStringStream::getDocumentOLEStream (  )  [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.

Implements WPXInputStream.

WPXInputStream* WPXStringStream::getDocumentOLEStream ( const char *  name  ) 
bool WPXStringStream::isOLEStream (  )  [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

Implements WPXInputStream.

WPXStringStream& WPXStringStream::operator= ( const WPXStringStream  )  [private]
const uint8_t * WPXStringStream::read ( size_t  numBytes,
size_t &  numBytesRead 
) [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.

Implements WPXInputStream.

int WPXStringStream::seek ( long  offset,
WPX_SEEK_TYPE  seekType 
) [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).

Implements WPXInputStream.

Referenced by isOLEStream().

long WPXStringStream::tell (  )  [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.

Implements WPXInputStream.

Referenced by seek().


Member Data Documentation


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

Generated on Tue Mar 16 11:19:17 2010 for libwpd by doxygen 1.6.3