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< RecTypeSizeaRecords
 
SvStreampStream
 
sal_uLong nFlagRecEnd
 
sal_uInt16 nMajorVersion
 
sal_uInt16 nMinorVersion
 
bool const bWriteMode: 1
 
bool bError: 1
 

Detailed Description

Definition at line 144 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 1130 of file laycache.cxx.

References aRecords, bError, nPos, pStream, and SvStream::Tell().

Referenced by SwLayCacheImpl::Read().

void SwLayCacheIoImpl::CloseFlagRec ( )

Close a flag record. Any bytes left are skipped.

Definition at line 1187 of file laycache.cxx.

References bWriteMode, nFlagRecEnd, 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 1092 of file laycache.cxx.

References aRecords, bError, bWriteMode, ERRCODE_NONE, SvStream::GetError(), SvStream::GetErrorCode(), nPos, pStream, SvStream::Seek(), SvStream::Tell(), and SvStream::WriteUInt32().

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

sal_uInt16 SwLayCacheIoImpl::GetMajorVersion ( ) const
inline

Definition at line 200 of file layhelp.hxx.

References nMajorVersion.

Referenced by SwLayCacheImpl::Read().

sal_uInt16 SwLayCacheIoImpl::GetMinorVersion ( ) const
inline

Definition at line 201 of file layhelp.hxx.

References nMinorVersion.

Referenced by SwLayCacheImpl::Read().

SvStream& SwLayCacheIoImpl::GetStream ( ) const
inline

Get input or output stream.

Definition at line 168 of file layhelp.hxx.

References pStream.

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

bool SwLayCacheIoImpl::HasError ( ) const
inline

Definition at line 198 of file layhelp.hxx.

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

References bWriteMode, nFlagRecEnd, 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 1177 of file laycache.cxx.

References bWriteMode, nFlagRecEnd, 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 1143 of file laycache.cxx.

References bError, ERRCODE_NONE, SvStream::GetErrorCode(), nPos, pStream, SvStream::ReadUChar(), SvStream::Seek(), and SvStream::Tell().

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

void SwLayCacheIoImpl::SkipRec ( )

Skip the current record.

Definition at line 1160 of file laycache.cxx.

References aRecords, CloseRec(), OpenRec(), Peek(), pStream, and SvStream::Seek().

Referenced by SwLayCacheImpl::Read().

Member Data Documentation

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

Definition at line 152 of file layhelp.hxx.

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

bool SwLayCacheIoImpl::bError
private

Definition at line 162 of file layhelp.hxx.

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

bool const SwLayCacheIoImpl::bWriteMode
private

Definition at line 161 of file layhelp.hxx.

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

sal_uLong SwLayCacheIoImpl::nFlagRecEnd
private

Definition at line 156 of file layhelp.hxx.

Referenced by CloseFlagRec(), and OpenFlagRec().

sal_uInt16 SwLayCacheIoImpl::nMajorVersion
private

Definition at line 158 of file layhelp.hxx.

Referenced by GetMajorVersion(), and SwLayCacheIoImpl().

sal_uInt16 SwLayCacheIoImpl::nMinorVersion
private

Definition at line 159 of file layhelp.hxx.

Referenced by GetMinorVersion(), and SwLayCacheIoImpl().

SvStream* SwLayCacheIoImpl::pStream
private

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