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 145 of file layhelp.hxx.

Constructor & Destructor Documentation

SwLayCacheIoImpl::SwLayCacheIoImpl ( SvStream rStrm,
bool  bWrtMd 
)

Member Function Documentation

sal_uInt32 SwLayCacheIoImpl::BytesLeft ( )

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

Definition at line 1131 of file laycache.cxx.

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

Referenced by SwLayCacheImpl::Read().

void SwLayCacheIoImpl::CloseFlagRec ( )

Close a flag record. Any bytes left are skipped.

Definition at line 1188 of file laycache.cxx.

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

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

void SwLayCacheIoImpl::CloseRec ( )

Close a record.

This skips any unread data that remains in the record.

Definition at line 1093 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().

sal_uInt16 SwLayCacheIoImpl::GetMajorVersion ( ) const
inline

Definition at line 201 of file layhelp.hxx.

References m_nMajorVersion.

Referenced by SwLayCacheImpl::Read().

sal_uInt16 SwLayCacheIoImpl::GetMinorVersion ( ) const
inline

Definition at line 202 of file layhelp.hxx.

References m_nMinorVersion.

Referenced by SwLayCacheImpl::Read().

SvStream& SwLayCacheIoImpl::GetStream ( ) const
inline

Get input or output stream.

Definition at line 169 of file layhelp.hxx.

References m_pStream.

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

bool SwLayCacheIoImpl::HasError ( ) const
inline

Definition at line 199 of file layhelp.hxx.

References m_bError.

Referenced by SwLayCacheImpl::Read().

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 1169 of file laycache.cxx.

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

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

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

Open flag record for writing;.

Definition at line 1178 of file laycache.cxx.

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

void SwLayCacheIoImpl::OpenRec ( sal_uInt8  nType)
sal_uInt8 SwLayCacheIoImpl::Peek ( )

Return the current record's type.

Definition at line 1144 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().

void SwLayCacheIoImpl::SkipRec ( )

Skip the current record.

Definition at line 1161 of file laycache.cxx.

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

Referenced by SwLayCacheImpl::Read().

Member Data Documentation

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

Definition at line 153 of file layhelp.hxx.

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

bool SwLayCacheIoImpl::m_bError
private

Definition at line 163 of file layhelp.hxx.

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

bool SwLayCacheIoImpl::m_bWriteMode
private

Definition at line 162 of file layhelp.hxx.

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

sal_uLong SwLayCacheIoImpl::m_nFlagRecEnd
private

Definition at line 157 of file layhelp.hxx.

Referenced by CloseFlagRec(), and OpenFlagRec().

sal_uInt16 SwLayCacheIoImpl::m_nMajorVersion
private

Definition at line 159 of file layhelp.hxx.

Referenced by GetMajorVersion(), and SwLayCacheIoImpl().

sal_uInt16 SwLayCacheIoImpl::m_nMinorVersion
private

Definition at line 160 of file layhelp.hxx.

Referenced by GetMinorVersion(), and SwLayCacheIoImpl().

SvStream* SwLayCacheIoImpl::m_pStream
private

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