Photon Fusion 2.0.9

Public Member Functions | Properties | List of all members
UnityLinkedListSurrogate< T, ReaderWriter > Class Template Reference

A surrogate for serializing a linked list. More...

Inherits UnitySurrogateBase.

Public Member Functions

override void Init (int capacity)
 Initializes the UnityLinkedListSurrogate with a specified capacity. More...
 
override void Read (int *data, int capacity)
 Reads data into the UnityLinkedListSurrogate from a specified memory location. More...
 
override void Write (int *data, int capacity)
 Writes data from the UnityLinkedListSurrogate to a specified memory location. More...
 

Properties

abstract T[] DataProperty [get, set]
 Gets or sets the data property. More...
 

Detailed Description

A surrogate for serializing a linked list.

Template Parameters
TThe type of the elements in the linked list.
ReaderWriterThe type of the reader writer for the elements in the linked list.
Type Constraints
T :unmanaged 
ReaderWriter :unmanaged 
ReaderWriter :IElementReaderWriter<T> 

Member Function Documentation

◆ Init()

override void Init ( int  capacity)
virtual

Initializes the UnityLinkedListSurrogate with a specified capacity.

Parameters
capacityThe capacity to initialize the UnityLinkedListSurrogate with.

Implements UnitySurrogateBase.

◆ Read()

override void Read ( int *  data,
int  capacity 
)
virtual

Reads data into the UnityLinkedListSurrogate from a specified memory location.

Parameters
dataThe memory location to read from.
capacityThe number of elements to read.

Implements UnitySurrogateBase.

◆ Write()

override void Write ( int *  data,
int  capacity 
)
virtual

Writes data from the UnityLinkedListSurrogate to a specified memory location.

Parameters
dataThe memory location to write to.
capacityThe number of elements to write.

Implements UnitySurrogateBase.

Property Documentation

◆ DataProperty

abstract T [] DataProperty
getset

Gets or sets the data property.