Windows C++ Library
Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
CMemStream Class Reference

#include <MemStream.hpp>

Inheritance diagram for CMemStream:
CStream WCL::IInputStream WCL::IOutputStream WCL::IStreamBase WCL::IStreamBase

List of all members.

Public Member Functions

 CMemStream (CBuffer &oBuffer)
virtual ~CMemStream ()
size_t Size () const
void Create ()
void Open ()
void Close ()
virtual void Read (void *pBuffer, size_t iNumBytes)
 Read a number of bytes from the stream.
virtual void Write (const void *pBuffer, size_t iNumBytes)
 Write a number of bytes to the stream.
virtual WCL::StreamPos Seek (WCL::StreamPos lPos, SeekPos eFrom=BEGIN)
 Move the stream pointer.
virtual bool IsEOF ()
 Query if the End of File has been reached.
virtual void Throw (int eErrCode, DWORD dwLastError)
 Throw a stream specific exception with the specified error code.

Protected Attributes

CBufferm_oBuffer
byte * m_pBuffer
size_t m_lAllocSize
size_t m_lEOF
size_t m_lPos

Static Protected Attributes

static const size_t ALLOC_SIZE = 1024

Private Member Functions

 CMemStream (const CMemStream &)
CMemStreamoperator= (const CMemStream &)

Constructor & Destructor Documentation

CMemStream::~CMemStream ( ) [virtual]
CMemStream::CMemStream ( const CMemStream ) [private]

Member Function Documentation

size_t CMemStream::Size ( ) const [inline]
void CMemStream::Open ( )
void CMemStream::Read ( void *  pBuffer,
size_t  iNumBytes 
) [virtual]

Read a number of bytes from the stream.

Implements WCL::IInputStream.

void CMemStream::Write ( const void *  pBuffer,
size_t  iNumBytes 
) [virtual]

Write a number of bytes to the stream.

Implements WCL::IOutputStream.

WCL::StreamPos CMemStream::Seek ( WCL::StreamPos  lPos,
SeekPos  eFrom = BEGIN 
) [virtual]

Move the stream pointer.

Implements WCL::IStreamBase.

bool CMemStream::IsEOF ( ) [virtual]

Query if the End of File has been reached.

Implements WCL::IInputStream.

void CMemStream::Throw ( int  eErrCode,
DWORD  dwLastError 
) [virtual]

Throw a stream specific exception with the specified error code.

Implements WCL::IStreamBase.

CMemStream& CMemStream::operator= ( const CMemStream ) [private]

Member Data Documentation

byte* CMemStream::m_pBuffer [protected]
size_t CMemStream::m_lAllocSize [protected]
size_t CMemStream::m_lEOF [protected]
size_t CMemStream::m_lPos [protected]
const size_t CMemStream::ALLOC_SIZE = 1024 [static, protected]

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