VST 3 SDK
VST 3.6.7
SDK for developing VST Plug-in
|
Memory based Stream for IBStream implementation (using malloc). More...
#include <memorystream.h>
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... | |
![]() | |
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 | |
![]() | |
enum | IStreamSeekMode |
![]() | |
static const FUID | iid |
![]() | |
static const FUID | iid |
Memory based Stream for IBStream implementation (using malloc).
MemoryStream | ( | ) |
MemoryStream | ( | void * | memory, |
TSize | memorySize | ||
) |
reuse a given memory without getting ownership
|
virtual |
Implements IBStream.
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
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |