Base Module  VST 3.7
SDK for developing VST plug-in
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FStreamer Class Referenceabstract

Byteorder-aware base class for typed stream i/o. More...

#include <fstreamer.h>

+ Inheritance diagram for FStreamer:

Public Member Functions

 FStreamer (int16 byteOrder=BYTEORDER)
 
virtual ~FStreamer ()
 
bool skip (uint32 bytes)
 
bool pad (uint32 bytes)
 
Implementing class must override.
virtual TSize readRaw (void *, TSize)=0
 Read one buffer of size.
 
virtual TSize writeRaw (const void *, TSize)=0
 Write one buffer of size.
 
virtual int64 seek (int64, FSeekMode)=0
 Set file position for stream.
 
virtual int64 tell ()=0
 Return current file position.
 
Streams are byteOrder aware.
void setByteOrder (int32 e)
 
int32 getByteOrder () const
 
read and write int8 and char.
bool writeChar8 (char8)
 
bool readChar8 (char8 &)
 
bool writeUChar8 (unsigned char)
 
bool readUChar8 (unsigned char &)
 
bool writeChar16 (char16 c)
 
bool readChar16 (char16 &c)
 
bool writeInt8 (int8 c)
 
bool readInt8 (int8 &c)
 
bool writeInt8u (uint8 c)
 
bool readInt8u (uint8 &c)
 
read and write int16.
bool writeInt16 (int16)
 
bool readInt16 (int16 &)
 
bool writeInt16Array (const int16 *array, int32 count)
 
bool readInt16Array (int16 *array, int32 count)
 
bool writeInt16u (uint16)
 
bool readInt16u (uint16 &)
 
bool writeInt16uArray (const uint16 *array, int32 count)
 
bool readInt16uArray (uint16 *array, int32 count)
 
read and write int32.
bool writeInt32 (int32)
 
bool readInt32 (int32 &)
 
bool writeInt32Array (const int32 *array, int32 count)
 
bool readInt32Array (int32 *array, int32 count)
 
bool writeInt32u (uint32)
 
bool readInt32u (uint32 &)
 
bool writeInt32uArray (const uint32 *array, int32 count)
 
bool readInt32uArray (uint32 *array, int32 count)
 
read and write int64.
bool writeInt64 (int64)
 
bool readInt64 (int64 &)
 
bool writeInt64Array (const int64 *array, int32 count)
 
bool readInt64Array (int64 *array, int32 count)
 
bool writeInt64u (uint64)
 
bool readInt64u (uint64 &)
 
bool writeInt64uArray (const uint64 *array, int32 count)
 
bool readInt64uArray (uint64 *array, int32 count)
 
read and write float and float array.
bool writeFloat (float)
 
bool readFloat (float &)
 
bool writeFloatArray (const float *array, int32 count)
 
bool readFloatArray (float *array, int32 count)
 
read and write double and double array.
bool writeDouble (double)
 
bool readDouble (double &)
 
bool writeDoubleArray (const double *array, int32 count)
 
bool readDoubleArray (double *array, int32 count)
 
read and write Boolean.
bool writeBool (bool)
 Write one boolean.
 
bool readBool (bool &)
 Read one bool.
 

Protected Attributes

int16 byteOrder
 

read and write Strings.

TSize writeString8 (const char8 *ptr, bool terminate=false)
 a direct output function writing only one string (ascii 8bit)
 
TSize readString8 (char8 *ptr, TSize size)
 a direct input function reading only one string (ascii) (ended by a
or \0 or eof)
 
bool writeStr8 (const char8 *ptr)
 write a string length (strlen) and string itself
 
char8 * readStr8 ()
 read a string length and string text (The return string must be deleted when use is finished)
 
bool writeStringUtf8 (const char *ptr)
 always terminated, converts to utf8 if non ascii characters are in string
 
int32 readStringUtf8 (char *ptr, int32 maxSize)
 read a UTF8 string
 
static int32 getStr8Size (const char8 *ptr)
 returns the size of a saved string
 

Detailed Description

Byteorder-aware base class for typed stream i/o.

Constructor & Destructor Documentation

FStreamer ( int16  byteOrder = BYTEORDER)
virtual ~FStreamer ( )
inlinevirtual

Member Function Documentation

virtual TSize readRaw ( void *  ,
TSize   
)
pure virtual

Read one buffer of size.

Implemented in IBStreamer.

virtual TSize writeRaw ( const void *  ,
TSize   
)
pure virtual

Write one buffer of size.

Implemented in IBStreamer.

virtual int64 seek ( int64  ,
FSeekMode   
)
pure virtual

Set file position for stream.

Implemented in IBStreamer.

virtual int64 tell ( )
pure virtual

Return current file position.

Implemented in IBStreamer.

void setByteOrder ( int32  e)
inline
int32 getByteOrder ( ) const
inline
bool writeChar8 ( char8  c)
bool readChar8 ( char8 &  c)
bool writeUChar8 ( unsigned char  c)
bool readUChar8 ( unsigned char &  c)
bool writeChar16 ( char16  c)
bool readChar16 ( char16 &  c)
bool writeInt8 ( int8  c)
bool readInt8 ( int8 &  c)
bool writeInt8u ( uint8  c)
bool readInt8u ( uint8 &  c)
bool writeInt16 ( int16  i)
bool readInt16 ( int16 &  i)
bool writeInt16Array ( const int16 *  array,
int32  count 
)
bool readInt16Array ( int16 *  array,
int32  count 
)
bool writeInt16u ( uint16  i)
bool readInt16u ( uint16 &  i)
bool writeInt16uArray ( const uint16 *  array,
int32  count 
)
bool readInt16uArray ( uint16 *  array,
int32  count 
)
bool writeInt32 ( int32  i)
bool readInt32 ( int32 &  i)
bool writeInt32Array ( const int32 *  array,
int32  count 
)
bool readInt32Array ( int32 *  array,
int32  count 
)
bool writeInt32u ( uint32  i)
bool readInt32u ( uint32 &  i)
bool writeInt32uArray ( const uint32 *  array,
int32  count 
)
bool readInt32uArray ( uint32 *  array,
int32  count 
)
bool writeInt64 ( int64  i)
bool readInt64 ( int64 &  i)
bool writeInt64Array ( const int64 *  array,
int32  count 
)
bool readInt64Array ( int64 *  array,
int32  count 
)
bool writeInt64u ( uint64  i)
bool readInt64u ( uint64 &  i)
bool writeInt64uArray ( const uint64 *  array,
int32  count 
)
bool readInt64uArray ( uint64 *  array,
int32  count 
)
bool writeFloat ( float  f)
bool readFloat ( float &  f)
bool writeFloatArray ( const float *  array,
int32  count 
)
bool readFloatArray ( float *  array,
int32  count 
)
bool writeDouble ( double  d)
bool readDouble ( double &  d)
bool writeDoubleArray ( const double *  array,
int32  count 
)
bool readDoubleArray ( double *  array,
int32  count 
)
bool writeBool ( bool  b)

Write one boolean.

bool readBool ( bool &  b)

Read one bool.

TSize writeString8 ( const char8 *  ptr,
bool  terminate = false 
)

a direct output function writing only one string (ascii 8bit)

TSize readString8 ( char8 *  ptr,
TSize  size 
)

a direct input function reading only one string (ascii) (ended by a
or \0 or eof)

bool writeStr8 ( const char8 *  ptr)

write a string length (strlen) and string itself

char8 * readStr8 ( )

read a string length and string text (The return string must be deleted when use is finished)

int32 getStr8Size ( const char8 *  ptr)
static

returns the size of a saved string

bool writeStringUtf8 ( const char *  ptr)

always terminated, converts to utf8 if non ascii characters are in string

int32 readStringUtf8 ( char *  ptr,
int32  maxSize 
)

read a UTF8 string

bool skip ( uint32  bytes)
bool pad ( uint32  bytes)

Member Data Documentation

int16 byteOrder
protected
Empty

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