Base Module VST 3.7
SDK for developing VST plug-in
FStreamSizeHolder Class Reference

FStreamSizeHolder Declaration remembers size of stream chunk for backward compatibility. More...

#include <fstreamer.h>

Public Member Functions

 FStreamSizeHolder (FStreamer &s)
 
void beginWrite ()
 remembers position and writes 0 More...
 
int32 endWrite ()
 writes and returns size (since the start marker) More...
 
int32 beginRead ()
 returns size More...
 
void endRead ()
 jump to end of chunk More...
 

Protected Attributes

FStreamerstream
 
int64 sizePos
 

Detailed Description

FStreamSizeHolder Declaration remembers size of stream chunk for backward compatibility.

Example:

externalize (a)
{
FStreamSizeHolder sizeHolder;
sizeHolder.beginWrite (); // sets start mark, writes dummy size
a << ....
sizeHolder.endWrite (); // jumps to start mark, updates size, jumps back here
}
internalize (a)
{
FStreamSizeHolder sizeHolder;
sizeHolder.beginRead (); // reads size, mark
a >> ....
sizeHolder.endRead (); // jumps forward if new version has larger size
}
FStreamSizeHolder(FStreamer &s)
Definition: fstreamer.cpp:93

Constructor & Destructor Documentation

◆ FStreamSizeHolder()

Member Function Documentation

◆ beginWrite()

void beginWrite ( )

remembers position and writes 0

◆ endWrite()

int32 endWrite ( )

writes and returns size (since the start marker)

◆ beginRead()

int32 beginRead ( )

returns size

◆ endRead()

void endRead ( )

jump to end of chunk

Member Data Documentation

◆ stream

FStreamer& stream
protected

◆ sizePos

int64 sizePos
protected
Empty

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