OSRTMemoryOutputStream Class Reference
#include <OSRTMemoryOutputStream.h>
Public Member Functions | |
EXTRTMETHOD | OSRTMemoryOutputStream () |
EXTRTMETHOD | OSRTMemoryOutputStream (OSOCTET *pMemBuf, size_t bufSize) |
EXTRTMETHOD | OSRTMemoryOutputStream (OSRTContext *pContext, OSOCTET *pMemBuf, size_t bufSize) |
EXTRTMETHOD OSOCTET * | getBuffer (size_t *pSize=0) |
Detailed Description
Generic memory output stream. This class provides methods for streaming data to an output memory buffer.
Constructor & Destructor Documentation
EXTRTMETHOD OSRTMemoryOutputStream::OSRTMemoryOutputStream | ( | ) |
The default constructor initializes the memory output stream to use a dynamic memory output buffer. The status of the construction can be obtained by calling the getStatus
method.
- See also:
- rtxStreamMemoryCreate
EXTRTMETHOD OSRTMemoryOutputStream::OSRTMemoryOutputStream | ( | OSOCTET * | pMemBuf, | |
size_t | bufSize | |||
) |
Initializes the memory output stream using the specified memory buffer. The status of the construction can be obtained by calling the getStatus
method.
- Parameters:
-
pMemBuf The pointer to the buffer. bufSize The size of the buffer.
- See also:
- rtxStreamMemoryAttach
EXTRTMETHOD OSRTMemoryOutputStream::OSRTMemoryOutputStream | ( | OSRTContext * | pContext, | |
OSOCTET * | pMemBuf, | |||
size_t | bufSize | |||
) |
Initializes the memory output stream using the specified memory buffer. The status of the construction can be obtained by calling the getStatus
method.
- Parameters:
-
pContext Pointer to a context to use. pMemBuf The pointer to the buffer. bufSize The size of the buffer.
- See also:
- rtxStreamMemoryAttach
Member Function Documentation
EXTRTMETHOD OSOCTET* OSRTMemoryOutputStream::getBuffer | ( | size_t * | pSize = 0 |
) |
This method returns the address of the memory buffer to which data was written. If the buffer memory is dynamic, it may be freed using the rtxMemFreePtr function or it will be freed when the stream object is destroyed.
- Parameters:
-
pSize Pointer to a size variable to receive the number of bytes written to the stream. This is an optional parameter, if a null pointer is passed, size is not returned.
- Returns:
- Pointer to memory buffer.
The documentation for this class was generated from the following file: