LibreOffice Module io (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
io_stm::MemRingBuffer Class Reference

#include <streamhelper.hxx>

Inheritance diagram for io_stm::MemRingBuffer:
[legend]

Public Member Functions

 MemRingBuffer ()
 
virtual ~MemRingBuffer ()
 
void writeAt (sal_Int32 nPos, const Sequence< sal_Int8 > &)
 
void readAt (sal_Int32 nPos, Sequence< sal_Int8 > &, sal_Int32 nBytesToRead) const
 
sal_Int32 getSize () const noexcept
 
void forgetFromStart (sal_Int32 nBytesToForget)
 

Private Member Functions

void resizeBuffer (sal_Int32 nMinSize)
 
void checkInvariants () const
 

Private Attributes

sal_Int8m_p
 
sal_Int32 m_nBufferLen
 
sal_Int32 m_nStart
 
sal_Int32 m_nOccupiedBuffer
 

Detailed Description

Definition at line 31 of file streamhelper.hxx.

Constructor & Destructor Documentation

◆ MemRingBuffer()

io_stm::MemRingBuffer::MemRingBuffer ( )

Definition at line 49 of file streamhelper.cxx.

◆ ~MemRingBuffer()

io_stm::MemRingBuffer::~MemRingBuffer ( )
virtual

Definition at line 53 of file streamhelper.cxx.

References m_p.

Member Function Documentation

◆ checkInvariants()

void io_stm::MemRingBuffer::checkInvariants ( ) const
inlineprivate

Definition at line 52 of file streamhelper.hxx.

References m_nBufferLen, m_nOccupiedBuffer, and m_nStart.

Referenced by forgetFromStart(), and writeAt().

◆ forgetFromStart()

void io_stm::MemRingBuffer::forgetFromStart ( sal_Int32  nBytesToForget)
Exceptions
css::io::BufferSizeExceededException

Definition at line 155 of file streamhelper.cxx.

References checkInvariants(), m_nBufferLen, m_nOccupiedBuffer, and m_nStart.

Referenced by io_stm::MemFIFO::read(), and io_stm::MemFIFO::skip().

◆ getSize()

sal_Int32 io_stm::MemRingBuffer::getSize ( ) const
noexcept

Definition at line 150 of file streamhelper.cxx.

References m_nOccupiedBuffer.

Referenced by io_stm::MemFIFO::getSize().

◆ readAt()

void io_stm::MemRingBuffer::readAt ( sal_Int32  nPos,
Sequence< sal_Int8 > &  seq,
sal_Int32  nBytesToRead 
) const
Exceptions
css::io::BufferSizeExceededException

Definition at line 90 of file streamhelper.cxx.

References m_nBufferLen, m_nOccupiedBuffer, m_nStart, m_p, and nPos.

Referenced by io_stm::MemFIFO::read().

◆ resizeBuffer()

void io_stm::MemRingBuffer::resizeBuffer ( sal_Int32  nMinSize)
private
Exceptions
css::io::BufferSizeExceededException

Definition at line 58 of file streamhelper.cxx.

References m_nBufferLen, m_nOccupiedBuffer, m_nStart, m_p, and p.

Referenced by writeAt().

◆ writeAt()

void io_stm::MemRingBuffer::writeAt ( sal_Int32  nPos,
const Sequence< sal_Int8 > &  seq 
)
Exceptions
css::io::BufferSizeExceededException

Definition at line 115 of file streamhelper.cxx.

References checkInvariants(), m_nBufferLen, m_nOccupiedBuffer, m_nStart, m_p, nPos, and resizeBuffer().

Referenced by io_stm::MemFIFO::write().

Member Data Documentation

◆ m_nBufferLen

sal_Int32 io_stm::MemRingBuffer::m_nBufferLen
private

Definition at line 62 of file streamhelper.hxx.

Referenced by checkInvariants(), forgetFromStart(), readAt(), resizeBuffer(), and writeAt().

◆ m_nOccupiedBuffer

sal_Int32 io_stm::MemRingBuffer::m_nOccupiedBuffer
private

◆ m_nStart

sal_Int32 io_stm::MemRingBuffer::m_nStart
private

Definition at line 63 of file streamhelper.hxx.

Referenced by checkInvariants(), forgetFromStart(), readAt(), resizeBuffer(), and writeAt().

◆ m_p

sal_Int8* io_stm::MemRingBuffer::m_p
private

Definition at line 61 of file streamhelper.hxx.

Referenced by readAt(), resizeBuffer(), writeAt(), and ~MemRingBuffer().


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