Photon Fusion 2.0.3

Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
NetBitBufferSerializer Struct Reference

Represents a serializer for reading and writing data to a NetBitBuffer. More...

Public Member Functions

bool Check (bool value)
 Checks the boolean value and writes or reads it from the buffer based on the serializer mode. More...
 
 NetBitBufferSerializer (NetBitBuffer *buffer, bool write)
 
void Serialize (ref bool value)
 Serializes a boolean value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref byte value)
 Serializes a byte value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref float value)
 Serializes a float value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref int value)
 Serializes an integer value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref string value)
 Serializes a string value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref uint value)
 Serializes an unsigned integer value by writing or reading it from the buffer based on the serializer mode. More...
 
void Serialize (ref ulong value)
 Serializes an unsigned long value by writing or reading it from the buffer based on the serializer mode. More...
 

Static Public Member Functions

static NetBitBufferSerializer Reader (NetBitBuffer *buffer)
 Creates a new instance of NetBitBufferSerializer for reading from the buffer. More...
 
static NetBitBufferSerializer Writer (NetBitBuffer *buffer)
 Creates a new instance of NetBitBufferSerializer for writing to the buffer. More...
 

Public Attributes

NetBitBuffer_buffer
 
bool _write
 

Properties

NetBitBufferBuffer [get]
 Gets the buffer associated with the serializer. More...
 
bool Reading [get]
 Gets a value indicating whether the serializer is in read mode. More...
 
bool Writing [get]
 Gets a value indicating whether the serializer is in write mode. More...
 

Detailed Description

Represents a serializer for reading and writing data to a NetBitBuffer.

Member Function Documentation

◆ Check()

bool Check ( bool  value)

Checks the boolean value and writes or reads it from the buffer based on the serializer mode.

Parameters
valueThe boolean value to check.
Returns
The boolean value read from the buffer if in read mode, otherwise the value written to the buffer.

◆ Reader()

static NetBitBufferSerializer Reader ( NetBitBuffer buffer)
static

Creates a new instance of NetBitBufferSerializer for reading from the buffer.

Parameters
bufferThe buffer to read from.
Returns
A new instance of NetBitBufferSerializer configured for reading.

◆ Serialize() [1/7]

void Serialize ( ref bool  value)

Serializes a boolean value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe boolean value to serialize.

◆ Serialize() [2/7]

void Serialize ( ref byte  value)

Serializes a byte value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe byte value to serialize.

◆ Serialize() [3/7]

void Serialize ( ref float  value)

Serializes a float value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe float value to serialize.

◆ Serialize() [4/7]

void Serialize ( ref int  value)

Serializes an integer value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe integer value to serialize.

◆ Serialize() [5/7]

void Serialize ( ref string  value)

Serializes a string value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe string value to serialize.

◆ Serialize() [6/7]

void Serialize ( ref uint  value)

Serializes an unsigned integer value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe unsigned integer value to serialize.

◆ Serialize() [7/7]

void Serialize ( ref ulong  value)

Serializes an unsigned long value by writing or reading it from the buffer based on the serializer mode.

Parameters
valueThe unsigned long value to serialize.

◆ Writer()

static NetBitBufferSerializer Writer ( NetBitBuffer buffer)
static

Creates a new instance of NetBitBufferSerializer for writing to the buffer.

Parameters
bufferThe buffer to write to.
Returns
A new instance of NetBitBufferSerializer configured for writing.

Property Documentation

◆ Buffer

NetBitBuffer* Buffer
get

Gets the buffer associated with the serializer.

◆ Reading

bool Reading
get

Gets a value indicating whether the serializer is in read mode.

◆ Writing

bool Writing
get

Gets a value indicating whether the serializer is in write mode.