Photon Fusion 2.0.6

Public Member Functions | Properties | List of all members
UnityDictionarySurrogate< TKeyType, TKeyReaderWriter, TValueType, TValueReaderWriter > Class Template Reference

A surrogate for serializing a dictionary. More...

Inherits UnitySurrogateBase.

Public Member Functions

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

Properties

abstract SerializableDictionary< TKeyType, TValueType > DataProperty [get, set]
 Gets or sets the data property. More...
 

Detailed Description

A surrogate for serializing a dictionary.

Template Parameters
TKeyTypeThe type of the key.
TKeyReaderWriterThe type of the key reader writer.
TValueTypeThe type of the value.
TValueReaderWriterThe type of the value reader writer.
See also
Fusion.Internal.UnitySurrogateBase
Type Constraints
TKeyType :unmanaged 
TKeyReaderWriter :unmanaged 
TKeyReaderWriter :IElementReaderWriter<TKeyType> 
TValueType :unmanaged 
TValueReaderWriter :unmanaged 
TValueReaderWriter :IElementReaderWriter<TValueType> 

Member Function Documentation

◆ Init()

override void Init ( int  capacity)
virtual

Initializes the UnityDictionarySurrogate with a specified capacity.

Parameters
capacityThe capacity to initialize the UnityDictionarySurrogate with.

Implements UnitySurrogateBase.

◆ Read()

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

Reads data into the UnityDictionarySurrogate 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 UnityDictionarySurrogate to a specified memory location.

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

Implements UnitySurrogateBase.

Property Documentation

◆ DataProperty

abstract SerializableDictionary<TKeyType, TValueType> DataProperty
getset

Gets or sets the data property.