|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Memory based Stream for IBStream implementation (using malloc). More...
#include "memorystream.h"
Public Member Functions | |
| MemoryStream (void *memory, TSize memorySize) | |
| reuse a given memory without getting ownership | |
| tresult PLUGIN_API | read (void *buffer, int32 numBytes, int32 *numBytesRead) SMTG_OVERRIDE |
| Reads binary data from stream. | |
| tresult PLUGIN_API | write (void *buffer, int32 numBytes, int32 *numBytesWritten) SMTG_OVERRIDE |
| Writes binary data to stream. | |
| tresult PLUGIN_API | seek (int64 pos, int32 mode, int64 *result) SMTG_OVERRIDE |
| Sets stream read-write position. | |
| tresult PLUGIN_API | tell (int64 *pos) SMTG_OVERRIDE |
| Gets current stream read-write position. | |
| TSize | getSize () const |
| returns the current memory size | |
| void | setSize (TSize size) |
| set the memory size, a realloc will occur if memory already used | |
| char * | getData () const |
| 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 | |
Public Member Functions inherited from Steinberg::FUnknown | |
| virtual tresult PLUGIN_API | queryInterface (const TUID _iid, void **obj)=0 |
| Query for a pointer to the specified interface. | |
| virtual uint32 PLUGIN_API | addRef ()=0 |
| Adds a reference and returns the new reference count. | |
| virtual uint32 PLUGIN_API | release ()=0 |
| Releases a reference and returns the new reference count. | |
Protected Attributes | |
| char * | memory |
| TSize | memorySize |
| TSize | size |
| int64 | cursor |
| bool | ownMemory |
| bool | allocationError |
Additional Inherited Members | |
Public Types inherited from Steinberg::IBStream | |
| enum | IStreamSeekMode { kIBSeekSet , kIBSeekCur , kIBSeekEnd } |
Static Public Attributes inherited from Steinberg::IBStream | |
| static const FUID | iid |
Static Public Attributes inherited from Steinberg::FUnknown | |
| static const FUID | iid |
Memory based Stream for IBStream implementation (using malloc).
Definition at line 47 of file memorystream.h.
| Steinberg::MemoryStream::MemoryStream | ( | ) |
Definition at line 60 of file memorystream.cpp.
| Steinberg::MemoryStream::MemoryStream | ( | void * | memory, |
| TSize | memorySize | ||
| ) |
reuse a given memory without getting ownership
Definition at line 48 of file memorystream.cpp.
|
virtual |
Definition at line 72 of file memorystream.cpp.
| char * Steinberg::MemoryStream::detachData | ( | ) |
returns the memory pointer and give up ownership
Definition at line 267 of file memorystream.cpp.
| char * Steinberg::MemoryStream::getData | ( | ) | const |
returns the memory pointer
Definition at line 261 of file memorystream.cpp.
| TSize Steinberg::MemoryStream::getSize | ( | ) | const |
returns the current memory size
Definition at line 190 of file memorystream.cpp.
|
virtual |
Reads binary data from stream.
| buffer | : destination buffer |
| numBytes | : amount of bytes to be read |
| numBytesRead | : result - how many bytes have been read from stream (set to 0 if this is of no interest) |
Implements Steinberg::IBStream.
Definition at line 81 of file memorystream.cpp.
|
virtual |
Sets stream read-write position.
| pos | : new stream position (dependent on mode) |
| mode | : value of enum IStreamSeekMode |
| result | : new seek position (set to 0 if this is of no interest) |
Implements Steinberg::IBStream.
Definition at line 154 of file memorystream.cpp.
| void Steinberg::MemoryStream::setSize | ( | TSize | size | ) |
set the memory size, a realloc will occur if memory already used
Definition at line 196 of file memorystream.cpp.
|
virtual |
Gets current stream read-write position.
| pos | : is assigned the current position if function succeeds |
Implements Steinberg::IBStream.
Definition at line 180 of file memorystream.cpp.
| bool Steinberg::MemoryStream::truncate | ( | ) |
realloc to the current use memory size if needed
Definition at line 282 of file memorystream.cpp.
| bool Steinberg::MemoryStream::truncateToCursor | ( | ) |
truncate memory at current cursor position
Definition at line 313 of file memorystream.cpp.
|
virtual |
Writes binary data to stream.
| buffer | : source buffer |
| numBytes | : amount of bytes to write |
| numBytesWritten | : result - how many bytes have been written to stream (set to 0 if this is of no interest) |
Implements Steinberg::IBStream.
Definition at line 120 of file memorystream.cpp.
|
protected |
Definition at line 76 of file memorystream.h.
|
protected |
Definition at line 74 of file memorystream.h.
|
protected |
Definition at line 71 of file memorystream.h.
|
protected |
Definition at line 72 of file memorystream.h.
|
protected |
Definition at line 75 of file memorystream.h.
|
protected |
Definition at line 73 of file memorystream.h.