LMMS
Loading...
Searching...
No Matches
Steinberg::FStreamer Class Referenceabstract

#include <fstreamer.h>

Inheritance diagram for Steinberg::FStreamer:
Steinberg::IBStreamer

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
char8readStr8 ()
 read a string length and string text (The return string must be deleted when use is finished)
bool writeStringUtf8 (const tchar *ptr)
 always terminated, converts to utf8 if non ascii characters are in string
int32 readStringUtf8 (tchar *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()

Steinberg::FStreamer::FStreamer ( int16 byteOrder = BYTEORDER)

◆ ~FStreamer()

virtual Steinberg::FStreamer::~FStreamer ( )
inlinevirtual

Member Function Documentation

◆ getByteOrder()

int32 Steinberg::FStreamer::getByteOrder ( ) const
inline

◆ getStr8Size()

int32 Steinberg::FStreamer::getStr8Size ( const char8 * ptr)
static

returns the size of a saved string

◆ pad()

bool Steinberg::FStreamer::pad ( uint32 bytes)

◆ readBool()

bool Steinberg::FStreamer::readBool ( bool & b)

Read one bool.

◆ readChar16()

bool Steinberg::FStreamer::readChar16 ( char16 & c)

◆ readChar8()

bool Steinberg::FStreamer::readChar8 ( char8 & c)

◆ readDouble()

bool Steinberg::FStreamer::readDouble ( double & d)

◆ readDoubleArray()

bool Steinberg::FStreamer::readDoubleArray ( double * array,
int32 count )

◆ readFloat()

bool Steinberg::FStreamer::readFloat ( float & f)

◆ readFloatArray()

bool Steinberg::FStreamer::readFloatArray ( float * array,
int32 count )

◆ readInt16()

bool Steinberg::FStreamer::readInt16 ( int16 & i)

◆ readInt16Array()

bool Steinberg::FStreamer::readInt16Array ( int16 * array,
int32 count )

◆ readInt16u()

bool Steinberg::FStreamer::readInt16u ( uint16 & i)

◆ readInt16uArray()

bool Steinberg::FStreamer::readInt16uArray ( uint16 * array,
int32 count )

◆ readInt32()

bool Steinberg::FStreamer::readInt32 ( int32 & i)

◆ readInt32Array()

bool Steinberg::FStreamer::readInt32Array ( int32 * array,
int32 count )

◆ readInt32u()

bool Steinberg::FStreamer::readInt32u ( uint32 & i)

◆ readInt32uArray()

bool Steinberg::FStreamer::readInt32uArray ( uint32 * array,
int32 count )

◆ readInt64()

bool Steinberg::FStreamer::readInt64 ( int64 & i)

◆ readInt64Array()

bool Steinberg::FStreamer::readInt64Array ( int64 * array,
int32 count )

◆ readInt64u()

bool Steinberg::FStreamer::readInt64u ( uint64 & i)

◆ readInt64uArray()

bool Steinberg::FStreamer::readInt64uArray ( uint64 * array,
int32 count )

◆ readInt8()

bool Steinberg::FStreamer::readInt8 ( int8 & c)
inline

◆ readInt8u()

bool Steinberg::FStreamer::readInt8u ( uint8 & c)
inline

◆ readRaw()

virtual TSize Steinberg::FStreamer::readRaw ( void * ,
TSize  )
pure virtual

Read one buffer of size.

Implemented in Steinberg::IBStreamer.

◆ readStr8()

char8 * Steinberg::FStreamer::readStr8 ( )

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

◆ readString8()

TSize Steinberg::FStreamer::readString8 ( char8 * ptr,
TSize size )

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

◆ readStringUtf8()

int32 Steinberg::FStreamer::readStringUtf8 ( tchar * ptr,
int32 maxSize )

read a UTF8 string

◆ readUChar8()

bool Steinberg::FStreamer::readUChar8 ( unsigned char & c)

◆ seek()

virtual int64 Steinberg::FStreamer::seek ( int64 ,
FSeekMode  )
pure virtual

Set file position for stream.

Implemented in Steinberg::IBStreamer.

◆ setByteOrder()

void Steinberg::FStreamer::setByteOrder ( int32 e)
inline

◆ skip()

bool Steinberg::FStreamer::skip ( uint32 bytes)

◆ tell()

virtual int64 Steinberg::FStreamer::tell ( )
pure virtual

Return current file position.

Implemented in Steinberg::IBStreamer.

◆ writeBool()

bool Steinberg::FStreamer::writeBool ( bool b)

Write one boolean.

◆ writeChar16()

bool Steinberg::FStreamer::writeChar16 ( char16 c)

◆ writeChar8()

bool Steinberg::FStreamer::writeChar8 ( char8 c)

◆ writeDouble()

bool Steinberg::FStreamer::writeDouble ( double d)

◆ writeDoubleArray()

bool Steinberg::FStreamer::writeDoubleArray ( const double * array,
int32 count )

◆ writeFloat()

bool Steinberg::FStreamer::writeFloat ( float f)

◆ writeFloatArray()

bool Steinberg::FStreamer::writeFloatArray ( const float * array,
int32 count )

◆ writeInt16()

bool Steinberg::FStreamer::writeInt16 ( int16 i)

◆ writeInt16Array()

bool Steinberg::FStreamer::writeInt16Array ( const int16 * array,
int32 count )

◆ writeInt16u()

bool Steinberg::FStreamer::writeInt16u ( uint16 i)

◆ writeInt16uArray()

bool Steinberg::FStreamer::writeInt16uArray ( const uint16 * array,
int32 count )

◆ writeInt32()

bool Steinberg::FStreamer::writeInt32 ( int32 i)

◆ writeInt32Array()

bool Steinberg::FStreamer::writeInt32Array ( const int32 * array,
int32 count )

◆ writeInt32u()

bool Steinberg::FStreamer::writeInt32u ( uint32 i)

◆ writeInt32uArray()

bool Steinberg::FStreamer::writeInt32uArray ( const uint32 * array,
int32 count )

◆ writeInt64()

bool Steinberg::FStreamer::writeInt64 ( int64 i)

◆ writeInt64Array()

bool Steinberg::FStreamer::writeInt64Array ( const int64 * array,
int32 count )

◆ writeInt64u()

bool Steinberg::FStreamer::writeInt64u ( uint64 i)

◆ writeInt64uArray()

bool Steinberg::FStreamer::writeInt64uArray ( const uint64 * array,
int32 count )

◆ writeInt8()

bool Steinberg::FStreamer::writeInt8 ( int8 c)
inline

◆ writeInt8u()

bool Steinberg::FStreamer::writeInt8u ( uint8 c)
inline

◆ writeRaw()

virtual TSize Steinberg::FStreamer::writeRaw ( const void * ,
TSize  )
pure virtual

Write one buffer of size.

Implemented in Steinberg::IBStreamer.

◆ writeStr8()

bool Steinberg::FStreamer::writeStr8 ( const char8 * ptr)

write a string length (strlen) and string itself

◆ writeString8()

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

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

◆ writeStringUtf8()

bool Steinberg::FStreamer::writeStringUtf8 ( const tchar * ptr)

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

◆ writeUChar8()

bool Steinberg::FStreamer::writeUChar8 ( unsigned char c)

Member Data Documentation

◆ byteOrder

int16 Steinberg::FStreamer::byteOrder
protected

The documentation for this class was generated from the following files: