VST 3 SDK VST 3.6.11 SDK for developing VST Plug-in

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
MemoryStream Class Reference
Common SDK Implementation Helper Classes

Memory based Stream for IBStream implementation (using malloc). More...

`#include <memorystream.h>`

Inheritance diagram for MemoryStream:

## Public Member Functions
| MemoryStream ()
| MemoryStream (void *memory, TSize memorySize)
| reuse a given memory without getting ownership More...
virtual | ~MemoryStream ()
virtual tresult | read (void *buffer, int32 numBytes, int32 *numBytesRead) SMTG_OVERRIDE
virtual tresult | write (void *buffer, int32 numBytes, int32 *numBytesWritten) SMTG_OVERRIDE
virtual tresult | seek (int64 pos, int32 mode, int64 *result) SMTG_OVERRIDE
virtual tresult | tell (int64 *pos) SMTG_OVERRIDE
TSize | getSize ()
| returns the current memory size More...
void | setSize (TSize size)
| set the memory size, a realloc will occur if memory already used More...
char * | getData ()
| returns the memory pointer More...
char * | detachData ()
| returns the memory pointer and give up ownership More...
bool | truncate ()
| realloc to the current use memory size if needed More...
bool | truncateToCursor ()
| truncate memory at current cursor position More...
Public Member Functions inherited from FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Protected Attributes
char * | memory
TSize | memorySize
TSize | size
int64 | cursor
bool | ownMemory
bool | allocationError

## Additional Inherited Members
Public Types inherited from IBStream
enum | IStreamSeekMode
Static Public Attributes inherited from IBStream
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Memory based Stream for IBStream implementation (using malloc).

## Constructor & Destructor Documentation

MemoryStream | ( |  | ) |

MemoryStream | ( | void * | memory,
|  | TSize | memorySize
| ) |  |

reuse a given memory without getting ownership

virtual ~MemoryStream | ( |  | ) |
| virtual

## Member Function Documentation

virtual tresult read | ( | void * | buffer,
|  | int32 | numBytes,
|  | int32 * | numBytesRead
| ) |  |
| virtual

Implements IBStream.

virtual tresult write | ( | void * | buffer,
|  | int32 | numBytes,
|  | int32 * | numBytesWritten
| ) |  |
| virtual

Implements IBStream.

virtual tresult seek | ( | int64 | pos,
|  | int32 | mode,
|  | int64 * | result
| ) |  |
| virtual

Implements IBStream.

virtual tresult tell | ( | int64 * | pos | ) |
| virtual

Implements IBStream.

TSize getSize | ( |  | ) |

returns the current memory size

void setSize | ( | TSize | size | ) |

set the memory size, a realloc will occur if memory already used

char* getData | ( |  | ) |

returns the memory pointer

char* detachData | ( |  | ) |

returns the memory pointer and give up ownership

bool truncate | ( |  | ) |

realloc to the current use memory size if needed

bool truncateToCursor | ( |  | ) |

truncate memory at current cursor position

## Member Data Documentation

char* memory
| protected

TSize memorySize
| protected

TSize size
| protected

int64 cursor
| protected

bool ownMemory
| protected

bool allocationError
| protected

Empty

Copyright ©2018 Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.