LibreOffice Module sw (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
SwLayCacheIoImpl Class Reference

#include <layhelp.hxx>

Collaboration diagram for SwLayCacheIoImpl:
[legend]

Classes

struct  RecTypeSize
 

Public Member Functions

 SwLayCacheIoImpl (SvStream &rStrm, bool bWrtMd)
 
SvStreamGetStream () const
 Get input or output stream. More...
 
void OpenRec (sal_uInt8 nType)
 Open a record of type "nType". More...
 
void CloseRec ()
 Close a record. More...
 
sal_uInt32 BytesLeft ()
 Return the number of bytes contained in the current record that haven't been read by now. More...
 
sal_uInt8 Peek ()
 Return the current record's type. More...
 
void SkipRec ()
 Skip the current record. More...
 
sal_uInt8 OpenFlagRec ()
 Open a flag record for reading. More...
 
void OpenFlagRec (sal_uInt8 nFlags, sal_uInt8 nLen)
 Open flag record for writing;. More...
 
void CloseFlagRec ()
 Close a flag record. Any bytes left are skipped. More...
 
bool HasError () const
 
sal_uInt16 GetMajorVersion () const
 
sal_uInt16 GetMinorVersion () const
 

Private Attributes

std::vector< RecTypeSizem_aRecords
 
SvStreamm_pStream
 
sal_uLong m_nFlagRecEnd
 
sal_uInt16 m_nMajorVersion
 
sal_uInt16 m_nMinorVersion
 
bool m_bWriteMode: 1
 
bool m_bError: 1
 

Detailed Description

Definition at line 149 of file layhelp.hxx.

Constructor & Destructor Documentation

◆ SwLayCacheIoImpl()

SwLayCacheIoImpl::SwLayCacheIoImpl ( SvStream rStrm,
bool  bWrtMd 
)

Member Function Documentation

◆ BytesLeft()

sal_uInt32 SwLayCacheIoImpl::BytesLeft ( )

Return the number of bytes contained in the current record that haven't been read by now.

Definition at line 1129 of file laycache.cxx.

References m_aRecords, m_bError, m_pStream, n, nPos, and SvStream::Tell().

Referenced by SwLayCacheImpl::Read().

◆ CloseFlagRec()

void SwLayCacheIoImpl::CloseFlagRec ( )

Close a flag record. Any bytes left are skipped.

Definition at line 1186 of file laycache.cxx.

References m_bWriteMode, m_nFlagRecEnd, m_pStream, SvStream::Seek(), and SvStream::Tell().

Referenced by SwLayCacheImpl::Read(), and SwLayoutCache::Write().

◆ CloseRec()

void SwLayCacheIoImpl::CloseRec ( )

Close a record.

This skips any unread data that remains in the record.

Definition at line 1091 of file laycache.cxx.

References ERRCODE_NONE, SvStream::GetError(), SvStream::GetErrorCode(), m_aRecords, m_bError, m_bWriteMode, m_pStream, n, nPos, SvStream::Seek(), SvStream::Tell(), and SvStream::WriteUInt32().

Referenced by SwLayCacheImpl::Read(), SkipRec(), and SwLayoutCache::Write().

◆ GetMajorVersion()

sal_uInt16 SwLayCacheIoImpl::GetMajorVersion ( ) const
inline

Definition at line 205 of file layhelp.hxx.

References m_nMajorVersion.

Referenced by SwLayCacheImpl::Read().

◆ GetMinorVersion()

sal_uInt16 SwLayCacheIoImpl::GetMinorVersion ( ) const
inline

Definition at line 206 of file layhelp.hxx.

References m_nMinorVersion.

Referenced by SwLayCacheImpl::Read().

◆ GetStream()

SvStream & SwLayCacheIoImpl::GetStream ( ) const
inline

Get input or output stream.

Definition at line 173 of file layhelp.hxx.

References m_pStream.

Referenced by SwLayCacheImpl::Read(), and SwLayoutCache::Write().

◆ HasError()

bool SwLayCacheIoImpl::HasError ( ) const
inline

Definition at line 203 of file layhelp.hxx.

References m_bError.

Referenced by SwLayCacheImpl::Read().

◆ OpenFlagRec() [1/2]

sal_uInt8 SwLayCacheIoImpl::OpenFlagRec ( )

Open a flag record for reading.

The uppermost four bits are flags, while the lowermost are the flag record's size. Flag records cannot be nested.

Definition at line 1167 of file laycache.cxx.

References m_bWriteMode, m_nFlagRecEnd, m_pStream, SvStream::ReadUChar(), and SvStream::Tell().

Referenced by SwLayCacheImpl::Read(), and SwLayoutCache::Write().

◆ OpenFlagRec() [2/2]

void SwLayCacheIoImpl::OpenFlagRec ( sal_uInt8  nFlags,
sal_uInt8  nLen 
)

Open flag record for writing;.

Definition at line 1176 of file laycache.cxx.

References m_bWriteMode, m_nFlagRecEnd, m_pStream, SvStream::Tell(), and SvStream::WriteUChar().

◆ OpenRec()

void SwLayCacheIoImpl::OpenRec ( sal_uInt8  nType)

◆ Peek()

sal_uInt8 SwLayCacheIoImpl::Peek ( )

Return the current record's type.

Definition at line 1142 of file laycache.cxx.

References ERRCODE_NONE, SvStream::GetErrorCode(), m_bError, m_pStream, nPos, SvStream::ReadUChar(), SvStream::Seek(), and SvStream::Tell().

Referenced by SwLayCacheImpl::Read(), and SkipRec().

◆ SkipRec()

void SwLayCacheIoImpl::SkipRec ( )

Skip the current record.

Definition at line 1159 of file laycache.cxx.

References CloseRec(), m_aRecords, m_pStream, OpenRec(), Peek(), and SvStream::Seek().

Referenced by SwLayCacheImpl::Read().

Member Data Documentation

◆ m_aRecords

std::vector<RecTypeSize> SwLayCacheIoImpl::m_aRecords
private

Definition at line 157 of file layhelp.hxx.

Referenced by BytesLeft(), CloseRec(), OpenRec(), and SkipRec().

◆ m_bError

bool SwLayCacheIoImpl::m_bError
private

Definition at line 167 of file layhelp.hxx.

Referenced by BytesLeft(), CloseRec(), HasError(), OpenRec(), and Peek().

◆ m_bWriteMode

bool SwLayCacheIoImpl::m_bWriteMode
private

Definition at line 166 of file layhelp.hxx.

Referenced by CloseFlagRec(), CloseRec(), OpenFlagRec(), OpenRec(), and SwLayCacheIoImpl().

◆ m_nFlagRecEnd

sal_uLong SwLayCacheIoImpl::m_nFlagRecEnd
private

Definition at line 161 of file layhelp.hxx.

Referenced by CloseFlagRec(), and OpenFlagRec().

◆ m_nMajorVersion

sal_uInt16 SwLayCacheIoImpl::m_nMajorVersion
private

Definition at line 163 of file layhelp.hxx.

Referenced by GetMajorVersion(), and SwLayCacheIoImpl().

◆ m_nMinorVersion

sal_uInt16 SwLayCacheIoImpl::m_nMinorVersion
private

Definition at line 164 of file layhelp.hxx.

Referenced by GetMinorVersion(), and SwLayCacheIoImpl().

◆ m_pStream

SvStream* SwLayCacheIoImpl::m_pStream
private

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