Base Module: FStreamSizeHolder Class Reference
Author: Steinberg

Base Module VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
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
int32 | endWrite ()
| writes and returns size (since the start marker)
int32 | beginRead ()
| returns size
void | endRead ()
| jump to end of chunk

## Protected Attributes
FStreamer & | stream
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
}
Steinberg::FStreamSizeHolder
FStreamSizeHolder Declaration remembers size of stream chunk for backward compatibility.
Definition fstreamer.h:180
Steinberg::FStreamSizeHolder::endRead
void endRead()
jump to end of chunk
Definition fstreamer.cpp:111
Steinberg::FStreamSizeHolder::beginWrite
void beginWrite()
remembers position and writes 0
Definition fstreamer.cpp:78
Steinberg::FStreamSizeHolder::FStreamSizeHolder
FStreamSizeHolder(FStreamer &s)
Definition fstreamer.cpp:73
Steinberg::FStreamSizeHolder::beginRead
int32 beginRead()
returns size
Definition fstreamer.cpp:101
Steinberg::FStreamSizeHolder::endWrite
int32 endWrite()
writes and returns size (since the start marker)
Definition fstreamer.cpp:85

## Constructor & Destructor Documentation

## ◆ FStreamSizeHolder()

FStreamSizeHolder | ( | FStreamer & | s | ) |

## 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.