LibreOffice Module unotools (master) 1
Public Member Functions | Private Attributes | List of all members
utl::OInputStreamHelper Class Referencefinal

The helper implementation for a using input streams based on SvLockBytes. More...

#include <streamhelper.hxx>

Inheritance diagram for utl::OInputStreamHelper:
[legend]
Collaboration diagram for utl::OInputStreamHelper:
[legend]

Public Member Functions

 OInputStreamHelper (SvLockBytesRef _xLockBytes, sal_uInt32 _nAvailable)
 
virtual sal_Int32 SAL_CALL readBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nBytesToRead) override
 
virtual sal_Int32 SAL_CALL readSomeBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nMaxBytesToRead) override
 
virtual void SAL_CALL skipBytes (sal_Int32 nBytesToSkip) override
 
virtual sal_Int32 SAL_CALL available () override
 
virtual void SAL_CALL closeInput () override
 
virtual void SAL_CALL seek (sal_Int64 location) override
 
virtual sal_Int64 SAL_CALL getPosition () override
 
virtual sal_Int64 SAL_CALL getLength () override
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT override
 

Private Attributes

std::mutex m_aMutex
 
SvLockBytesRef m_xLockBytes
 
sal_uInt64 m_nActPos
 
sal_Int32 m_nAvailable
 

Detailed Description

The helper implementation for a using input streams based on SvLockBytes.

Definition at line 37 of file streamhelper.hxx.

Constructor & Destructor Documentation

◆ OInputStreamHelper()

utl::OInputStreamHelper::OInputStreamHelper ( SvLockBytesRef  _xLockBytes,
sal_uInt32  _nAvailable 
)
inline

Definition at line 45 of file streamhelper.hxx.

Member Function Documentation

◆ acquire()

void SAL_CALL utl::OInputStreamHelper::acquire ( )
overridevirtual

Definition at line 116 of file streamhelper.cxx.

◆ available()

sal_Int32 SAL_CALL utl::OInputStreamHelper::available ( )
overridevirtual

◆ closeInput()

void SAL_CALL utl::OInputStreamHelper::closeInput ( )
overridevirtual

Definition at line 107 of file streamhelper.cxx.

References tools::SvRef< typename T >::is(), m_aMutex, and m_xLockBytes.

◆ getLength()

sal_Int64 SAL_CALL utl::OInputStreamHelper::getLength ( )
overridevirtual

◆ getPosition()

sal_Int64 SAL_CALL utl::OInputStreamHelper::getPosition ( )
overridevirtual

Definition at line 63 of file streamhelper.cxx.

References m_nActPos.

◆ readBytes()

sal_Int32 SAL_CALL utl::OInputStreamHelper::readBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nBytesToRead 
)
overridevirtual

◆ readSomeBytes()

sal_Int32 SAL_CALL utl::OInputStreamHelper::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nMaxBytesToRead 
)
overridevirtual

Definition at line 79 of file streamhelper.cxx.

References aData, and readBytes().

◆ seek()

void SAL_CALL utl::OInputStreamHelper::seek ( sal_Int64  location)
overridevirtual

Definition at line 57 of file streamhelper.cxx.

References m_aMutex, and m_nActPos.

◆ skipBytes()

void SAL_CALL utl::OInputStreamHelper::skipBytes ( sal_Int32  nBytesToSkip)
overridevirtual

Definition at line 86 of file streamhelper.cxx.

References tools::SvRef< typename T >::is(), m_aMutex, m_nActPos, and m_xLockBytes.

Member Data Documentation

◆ m_aMutex

std::mutex utl::OInputStreamHelper::m_aMutex
private

Definition at line 39 of file streamhelper.hxx.

Referenced by available(), closeInput(), getLength(), readBytes(), seek(), and skipBytes().

◆ m_nActPos

sal_uInt64 utl::OInputStreamHelper::m_nActPos
private

Definition at line 41 of file streamhelper.hxx.

Referenced by getPosition(), readBytes(), seek(), and skipBytes().

◆ m_nAvailable

sal_Int32 utl::OInputStreamHelper::m_nAvailable
private

Definition at line 42 of file streamhelper.hxx.

Referenced by available().

◆ m_xLockBytes

SvLockBytesRef utl::OInputStreamHelper::m_xLockBytes
private

Definition at line 40 of file streamhelper.hxx.

Referenced by available(), closeInput(), getLength(), readBytes(), and skipBytes().


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