Base Module: FStreamSizeHolder Class Reference
Author: Steinberg

Base Module VST 3.7 SDK for developing VST plug-in

- Main Page
- Namespaces
- Classes
- Files

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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
}

## Constructor & Destructor Documentation

FStreamSizeHolder | ( | FStreamer & | s | ) |

## Member Function Documentation

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

## Member Data Documentation

FStreamer& stream
| protected

int64 sizePos
| protected

Empty

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