Photon Quantum 3.0.0

Static Public Member Functions | List of all members
Quantum.ByteStreamExtension Class Reference

Byte stream extension methods. More...

Static Public Member Functions

static Boolean Serialize (this ByteStream stream, Boolean write, Boolean value)
 Write or read a bool value to or from the byte stream. More...
 
static Button Serialize (this ByteStream stream, Boolean write, Button value)
 Write or read a Button value to or from the byte stream. More...
 
static void Serialize (this ByteStream stream, Boolean write, Byte *ptr, Int32 size)
 Write or read a byte array to or from the byte stream. More...
 
static Byte Serialize (this ByteStream stream, Boolean write, Byte value)
 Write or read a byte value to or from the byte stream. More...
 
static Char Serialize (this ByteStream stream, Boolean write, Char value)
 Write or read a char value to or from the byte stream. More...
 
static FP Serialize (this ByteStream stream, Boolean write, FP value)
 Write or read a FP value to or from the byte stream. More...
 
static FPQuaternion Serialize (this ByteStream stream, Boolean write, FPQuaternion value)
 Write or read a FPQuaternion value to or from the byte stream. More...
 
static FPVector2 Serialize (this ByteStream stream, Boolean write, FPVector2 value)
 Write or read a FPVector2 value to or from the byte stream. More...
 
static FPVector3 Serialize (this ByteStream stream, Boolean write, FPVector3 value)
 Write or read a FPVector3 value to or from the byte stream. More...
 
static Int16 Serialize (this ByteStream stream, Boolean write, Int16 value)
 Write or read a short value to or from the byte stream. More...
 
static Int32 Serialize (this ByteStream stream, Boolean write, Int32 value, bool varInt=false)
 Write or read an integer value to or from the byte stream. More...
 
static Int64 Serialize (this ByteStream stream, Boolean write, Int64 value)
 Write or read a long value to or from the byte stream. More...
 
static SByte Serialize (this ByteStream stream, Boolean write, SByte value)
 Write or read a signed byte value to or from the byte stream. More...
 
static UInt16 Serialize (this ByteStream stream, Boolean write, UInt16 value)
 Write or read an unsigned short value to or from the byte stream. More...
 
static UInt32 Serialize (this ByteStream stream, Boolean write, UInt32 value)
 Write or read an unsigned integer value to or from the byte stream. More...
 
static UInt64 Serialize (this ByteStream stream, Boolean write, UInt64 value)
 Write or read an unsigned long value to or from the byte stream. More...
 
static T[] SerializeArrayLength< T > (this ByteStream stream, Boolean write, T[] array, bool varInt=false)
 Serialize or deserialize an array from the byte stream. More...
 
static Byte[] SerializeByteArray (this ByteStream stream, Boolean write, Byte[] array)
 Write or read a byte array to or from the byte stream. More...
 
static Int32[] SerializeIntArray (this ByteStream stream, Boolean write, Int32[] array, bool varInt=false)
 Write or load an integer array to or from the byte stream More...
 
static FP SerializeRaw (this ByteStream stream, Boolean write, FP value)
 Write or read a FP value as raw to or from the byte stream. More...
 
static String SerializeString (this ByteStream stream, Boolean write, String value)
 Write or read a string to or from the byte stream. More...
 

Detailed Description

Byte stream extension methods.

Member Function Documentation

◆ SerializeArrayLength< T >()

static T [] Quantum.ByteStreamExtension.SerializeArrayLength< T > ( this ByteStream  stream,
Boolean  write,
T[]  array,
bool  varInt = false 
)
inlinestatic

Serialize or deserialize an array from the byte stream.

Template Parameters
TType of array
Parameters
streamTarget stream
writeStream write or read mode
arraySource array
varIntUse int compression
Returns
The input array

◆ SerializeString()

static String Quantum.ByteStreamExtension.SerializeString ( this ByteStream  stream,
Boolean  write,
String  value 
)
inlinestatic

Write or read a string to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to serialize or deserialize
Returns
The value that was read or written

◆ SerializeByteArray()

static Byte [] Quantum.ByteStreamExtension.SerializeByteArray ( this ByteStream  stream,
Boolean  write,
Byte[]  array 
)
inlinestatic

Write or read a byte array to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
arrayThe array to write or read
Returns
The value that was read or written

◆ SerializeIntArray()

static Int32 [] Quantum.ByteStreamExtension.SerializeIntArray ( this ByteStream  stream,
Boolean  write,
Int32[]  array,
bool  varInt = false 
)
inlinestatic

Write or load an integer array to or from the byte stream

Parameters
streamTarget stream
writeStream write or read mode
arraySource array
varIntUse var int compression
Returns
The input array

◆ Serialize() [1/16]

static void Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Byte *  ptr,
Int32  size 
)
inlinestatic

Write or read a byte array to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
ptrPointer to byte array
sizeByte array lengh

◆ Serialize() [2/16]

static Button Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Button  value 
)
inlinestatic

Write or read a Button value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [3/16]

static Boolean Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Boolean  value 
)
inlinestatic

Write or read a bool value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [4/16]

static Byte Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Byte  value 
)
inlinestatic

Write or read a byte value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [5/16]

static SByte Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
SByte  value 
)
inlinestatic

Write or read a signed byte value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [6/16]

static Char Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Char  value 
)
inlinestatic

Write or read a char value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [7/16]

static UInt16 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
UInt16  value 
)
inlinestatic

Write or read an unsigned short value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [8/16]

static Int16 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Int16  value 
)
inlinestatic

Write or read a short value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [9/16]

static UInt32 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
UInt32  value 
)
inlinestatic

Write or read an unsigned integer value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [10/16]

static Int32 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Int32  value,
bool  varInt = false 
)
inlinestatic

Write or read an integer value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
varIntUse int compression
Returns
The input value or the value read from the stream

◆ Serialize() [11/16]

static UInt64 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
UInt64  value 
)
inlinestatic

Write or read an unsigned long value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [12/16]

static Int64 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
Int64  value 
)
inlinestatic

Write or read a long value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [13/16]

static FP Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
FP  value 
)
inlinestatic

Write or read a FP value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ SerializeRaw()

static FP Quantum.ByteStreamExtension.SerializeRaw ( this ByteStream  stream,
Boolean  write,
FP  value 
)
inlinestatic

Write or read a FP value as raw to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [14/16]

static FPVector2 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
FPVector2  value 
)
inlinestatic

Write or read a FPVector2 value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [15/16]

static FPVector3 Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
FPVector3  value 
)
inlinestatic

Write or read a FPVector3 value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream

◆ Serialize() [16/16]

static FPQuaternion Quantum.ByteStreamExtension.Serialize ( this ByteStream  stream,
Boolean  write,
FPQuaternion  value 
)
inlinestatic

Write or read a FPQuaternion value to or from the byte stream.

Parameters
streamTarget stream
writeStream write or read mode
valueThe value to write or read
Returns
The input value or the value read from the stream