Photon Fusion 2.0.4

Public Member Functions | List of all members
UnitySurrogateBase Class Referenceabstract

Represents a base class for Unity surrogates. This class is serializable and provides abstract methods for reading, writing, and initializing data. More...

Inherits IUnitySurrogate.

Inherited by UnityArraySurrogate< T, ReaderWriter >, UnityDictionarySurrogate< TKeyType, TKeyReaderWriter, TValueType, TValueReaderWriter >, UnityLinkedListSurrogate< T, ReaderWriter >, and UnityValueSurrogate< T, TReaderWriter >.

Public Member Functions

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

Detailed Description

Represents a base class for Unity surrogates. This class is serializable and provides abstract methods for reading, writing, and initializing data.

Member Function Documentation

◆ Init()

abstract void Init ( int  capacity)
pure virtual

◆ Read()

abstract void Read ( int *  data,
int  capacity 
)
pure virtual

Reads data from a specified memory location into the UnitySurrogateBase.

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

Implements IUnitySurrogate.

Implemented in UnityValueSurrogate< T, TReaderWriter >, UnityLinkedListSurrogate< T, ReaderWriter >, UnityDictionarySurrogate< TKeyType, TKeyReaderWriter, TValueType, TValueReaderWriter >, and UnityArraySurrogate< T, ReaderWriter >.

◆ Write()

abstract void Write ( int *  data,
int  capacity 
)
pure virtual

Writes data from the UnitySurrogateBase to a specified memory location.

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

Implements IUnitySurrogate.

Implemented in UnityValueSurrogate< T, TReaderWriter >, UnityLinkedListSurrogate< T, ReaderWriter >, UnityDictionarySurrogate< TKeyType, TKeyReaderWriter, TValueType, TValueReaderWriter >, and UnityArraySurrogate< T, ReaderWriter >.