LibreOffice Module oox (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oox::SequenceSeekableStream Class Reference

Base class for binary input and output streams wrapping a StreamDataSequence, which is always seekable. More...

#include <binarystreambase.hxx>

Inheritance diagram for oox::SequenceSeekableStream:
[legend]
Collaboration diagram for oox::SequenceSeekableStream:
[legend]

Public Member Functions

virtual sal_Int64 size () const override
 Returns the size of the wrapped data sequence. More...
 
virtual sal_Int64 tell () const override
 Returns the current stream position. More...
 
virtual void seek (sal_Int64 nPos) override
 Seeks the stream to the passed position. More...
 
virtual void close () override
 Releases the reference to the data sequence. More...
 
- Public Member Functions inherited from oox::BinaryStreamBase
virtual ~BinaryStreamBase ()
 
bool isSeekable () const
 Returns true, if the implementation supports the seek() operation. More...
 
bool isEof () const
 Returns true, if the stream position is invalid (EOF). More...
 
sal_Int64 getRemaining () const
 Returns the size of the remaining data available in the stream, if stream supports size() and tell(), otherwise -1. More...
 
void seekToStart ()
 Seeks the stream to the beginning, if stream is seekable. More...
 
void alignToBlock (sal_Int32 nBlockSize, sal_Int64 nAnchorPos)
 Seeks the stream forward to a position that is a multiple of the passed block size, if stream is seekable. More...
 

Protected Member Functions

 SequenceSeekableStream (const StreamDataSequence &rData)
 
- Protected Member Functions inherited from oox::BinaryStreamBase
 BinaryStreamBase (bool bSeekable)
 

Protected Attributes

const StreamDataSequencempData
 Wrapped data sequence. More...
 
sal_Int32 mnPos
 Current position in the sequence. More...
 
- Protected Attributes inherited from oox::BinaryStreamBase
bool mbEof
 End of stream flag. More...
 

Detailed Description

Base class for binary input and output streams wrapping a StreamDataSequence, which is always seekable.

The wrapped data sequence MUST live at least as long as this stream wrapper. The data sequence MUST NOT be changed from outside as long as this stream wrapper is used to modify it.

Definition at line 154 of file binarystreambase.hxx.

Constructor & Destructor Documentation

oox::SequenceSeekableStream::SequenceSeekableStream ( const StreamDataSequence rData)
explicitprotected

Definition at line 113 of file binarystreambase.cxx.

Member Function Documentation

void oox::SequenceSeekableStream::close ( )
overridevirtual

Releases the reference to the data sequence.

Implements oox::BinaryStreamBase.

Definition at line 139 of file binarystreambase.cxx.

References oox::BinaryStreamBase::mbEof, and mpData.

void oox::SequenceSeekableStream::seek ( sal_Int64  nPos)
overridevirtual

Seeks the stream to the passed position.

Implements oox::BinaryStreamBase.

Definition at line 130 of file binarystreambase.cxx.

References oox::BinaryStreamBase::mbEof, mnPos, and mpData.

sal_Int64 oox::SequenceSeekableStream::size ( ) const
overridevirtual

Returns the size of the wrapped data sequence.

Implements oox::BinaryStreamBase.

Definition at line 120 of file binarystreambase.cxx.

References mpData.

sal_Int64 oox::SequenceSeekableStream::tell ( ) const
overridevirtual

Returns the current stream position.

Implements oox::BinaryStreamBase.

Definition at line 125 of file binarystreambase.cxx.

References mnPos, and mpData.

Member Data Documentation

sal_Int32 oox::SequenceSeekableStream::mnPos
protected
const StreamDataSequence* oox::SequenceSeekableStream::mpData
protected

Wrapped data sequence.

Definition at line 170 of file binarystreambase.hxx.

Referenced by close(), oox::SequenceInputStream::readData(), oox::SequenceInputStream::readMemory(), seek(), size(), and tell().


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