LibreOffice Module ucb (master) 1
Public Member Functions | Private Attributes | List of all members
cmis::StdInputStream Class Reference

Implements a seekable InputStream working on an std::istream. More...

#include <std_inputstream.hxx>

Inheritance diagram for cmis::StdInputStream:
[legend]
Collaboration diagram for cmis::StdInputStream:
[legend]

Public Member Functions

 StdInputStream (boost::shared_ptr< std::istream > pStream)
 
virtual ~StdInputStream () override
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
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
 XSeekable. More...
 
virtual sal_Int64 SAL_CALL getPosition () override
 
virtual sal_Int64 SAL_CALL getLength () override
 
- Public Member Functions inherited from cppu::OWeakObject
 OWeakObject ()
 
 OWeakObject (const OWeakObject &)
 
OWeakObject &SAL_CALL operator= (const OWeakObject &)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter () SAL_OVERRIDE
 
SAL_CALL operator css::uno::Reference< css::uno::XInterface > ()
 

Private Attributes

std::mutex m_aMutex
 
boost::shared_ptr< std::istream > m_pStream
 
sal_Int64 m_nLength
 

Additional Inherited Members

- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 
void disposeWeakConnectionPoint ()
 
- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 

Detailed Description

Implements a seekable InputStream working on an std::istream.

Definition at line 25 of file std_inputstream.hxx.

Constructor & Destructor Documentation

◆ StdInputStream()

cmis::StdInputStream::StdInputStream ( boost::shared_ptr< std::istream >  pStream)

Definition at line 24 of file std_inputstream.cxx.

References m_nLength, m_nLength, m_pStream, and m_pStream.

◆ ~StdInputStream()

cmis::StdInputStream::~StdInputStream ( )
overridevirtual

Definition at line 39 of file std_inputstream.cxx.

Member Function Documentation

◆ acquire()

void SAL_CALL cmis::StdInputStream::acquire ( )
overridevirtualnoexcept

Reimplemented from cppu::OWeakObject.

Definition at line 52 of file std_inputstream.cxx.

◆ available()

sal_Int32 SAL_CALL cmis::StdInputStream::available ( )
overridevirtual

Definition at line 129 of file std_inputstream.cxx.

References getPosition(), m_nLength, and SAL_MAX_INT32.

◆ closeInput()

void SAL_CALL cmis::StdInputStream::closeInput ( )
overridevirtual

Definition at line 134 of file std_inputstream.cxx.

◆ getLength()

sal_Int64 SAL_CALL cmis::StdInputStream::getLength ( )
overridevirtual

Definition at line 177 of file std_inputstream.cxx.

References m_nLength.

◆ getPosition()

sal_Int64 SAL_CALL cmis::StdInputStream::getPosition ( )
overridevirtual

Definition at line 163 of file std_inputstream.cxx.

References m_aMutex, m_pStream, and nPos.

Referenced by available().

◆ queryInterface()

uno::Any SAL_CALL cmis::StdInputStream::queryInterface ( const css::uno::Type &  rType)
overridevirtual

Reimplemented from cppu::OWeakObject.

Definition at line 43 of file std_inputstream.cxx.

References uno::Any::hasValue().

◆ readBytes()

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

Definition at line 62 of file std_inputstream.cxx.

References aData, m_aMutex, m_pStream, and SAL_INFO.

◆ readSomeBytes()

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

Definition at line 87 of file std_inputstream.cxx.

References aData, m_aMutex, m_pStream, and SAL_INFO.

◆ release()

void SAL_CALL cmis::StdInputStream::release ( )
overridevirtualnoexcept

Reimplemented from cppu::OWeakObject.

Definition at line 57 of file std_inputstream.cxx.

◆ seek()

void SAL_CALL cmis::StdInputStream::seek ( sal_Int64  location)
overridevirtual

XSeekable.

Definition at line 139 of file std_inputstream.cxx.

References m_aMutex, m_nLength, m_pStream, and SAL_INFO.

◆ skipBytes()

void SAL_CALL cmis::StdInputStream::skipBytes ( sal_Int32  nBytesToSkip)
overridevirtual

Definition at line 111 of file std_inputstream.cxx.

References m_aMutex, m_pStream, and SAL_INFO.

Member Data Documentation

◆ m_aMutex

std::mutex cmis::StdInputStream::m_aMutex
private

Definition at line 76 of file std_inputstream.hxx.

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

◆ m_nLength

sal_Int64 cmis::StdInputStream::m_nLength
private

Definition at line 78 of file std_inputstream.hxx.

Referenced by available(), getLength(), seek(), and StdInputStream().

◆ m_pStream

boost::shared_ptr< std::istream > cmis::StdInputStream::m_pStream
private

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