LibreOffice Module oox (master) 1
|
Base class for binary input and output streams wrapping a StreamDataSequence, which is always seekable. More...
#include <binarystreambase.hxx>
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 () |
virtual sal_Int64 | size () const =0 |
Implementations return the size of the stream, if possible. More... | |
virtual sal_Int64 | tell () const =0 |
Implementations return the current stream position, if possible. More... | |
virtual void | seek (sal_Int64 nPos)=0 |
Implementations seek the stream to the passed position, if the stream is seekable. More... | |
virtual void | close ()=0 |
Implementations close the stream. More... | |
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 StreamDataSequence * | mpData |
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... | |
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.
|
explicitprotected |
Definition at line 112 of file binarystreambase.cxx.
|
overridevirtual |
Releases the reference to the data sequence.
Implements oox::BinaryStreamBase.
Definition at line 138 of file binarystreambase.cxx.
References oox::BinaryStreamBase::mbEof, and mpData.
|
overridevirtual |
Seeks the stream to the passed position.
Implements oox::BinaryStreamBase.
Definition at line 129 of file binarystreambase.cxx.
References oox::BinaryStreamBase::mbEof, mnPos, mpData, and nPos.
|
overridevirtual |
Returns the size of the wrapped data sequence.
Implements oox::BinaryStreamBase.
Definition at line 119 of file binarystreambase.cxx.
References mpData.
|
overridevirtual |
Returns the current stream position.
Implements oox::BinaryStreamBase.
Definition at line 124 of file binarystreambase.cxx.
|
protected |
Current position in the sequence.
Definition at line 171 of file binarystreambase.hxx.
Referenced by oox::SequenceInputStream::readData(), oox::SequenceInputStream::readMemory(), seek(), oox::SequenceInputStream::skip(), and tell().
|
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().