The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CMemoryInputOutputStream Class Reference
[I/O Streams]

Inheritance diagram for CMemoryInputOutputStream:
Collaboration diagram for CMemoryInputOutputStream:

List of all members.


Detailed Description

An object that implements IInputStream and ICloseableOutputStream on a memory buffer.


Public Types

typedef unsigned long DataLength
typedef unsigned long DataLength

Public Member Functions

 CMemoryInputOutputStream ()
 Create streams on a 0 sized memory buffer. Call Resize() to actually allocate a buffer to work in.
 CMemoryInputOutputStream (DataLength size)
 Create streams on a size sized memory buffer and take ownership of that buffer.
 CMemoryInputOutputStream (BYTE *pData, DataLength size)
 Create streams on the supplied memory buffer. Does not take ownership of the memory.
 CMemoryInputOutputStream (const CMemoryInputOutputStream &rhs)
 ~CMemoryInputOutputStream () override
CMemoryInputOutputStreamoperator= (const CMemoryInputOutputStream &rhs)
void Resize (DataLength size)
 Resize the memory buffer. Note this only works if the object owns the memory buffer.
void Read (BYTE *pData, DataLength dataLength) override
void Write (const BYTE *pData, DataLength dataLength) override
void Close () override
virtual void WriteString (const std::string &message)


Member Typedef Documentation

typedef unsigned long DataLength [inherited]

typedef unsigned long DataLength [inherited]


Constructor & Destructor Documentation

Create streams on a 0 sized memory buffer. Call Resize() to actually allocate a buffer to work in.

CMemoryInputOutputStream ( DataLength  size  )  [explicit]

Create streams on a size sized memory buffer and take ownership of that buffer.

CMemoryInputOutputStream ( BYTE pData,
DataLength  size 
)

Create streams on the supplied memory buffer. Does not take ownership of the memory.

~CMemoryInputOutputStream (  )  [override]


Member Function Documentation

CMemoryInputOutputStream& operator= ( const CMemoryInputOutputStream rhs  ) 

void Resize ( DataLength  size  ) 

Resize the memory buffer. Note this only works if the object owns the memory buffer.

void Read ( BYTE pData,
DataLength  dataLength 
) [override, virtual]

Implements IInputStream.

void Write ( const BYTE pData,
DataLength  dataLength 
) [override, virtual]

Implements IOutputStream.

void Close (  )  [override, virtual]

virtual void WriteString ( const std::string &  message  )  [inline, virtual, inherited]


Generated on Sun Sep 12 19:09:35 2021 for The Server Framework - v7.4 by doxygen 1.5.3